New submission from Mithil <mithil...@gmail.com>:

pytime.h compilation gives warnings - 

pytime.h:123:59: warning: 'struct timeval' declared inside parameter list will 
not be visible outside of this definition or declaration
 PyAPI_FUNC(int) _PyTime_FromTimeval(_PyTime_t *tp, struct timeval *tv);
                                                           ^~~~~~~
pytime.h:130:12: warning: 'struct timeval' declared inside parameter list will 
not be visible outside of this definition or declaration
     struct timeval *tv,
            ^~~~~~~
pytime.h:135:12: warning: 'struct timeval' declared inside parameter list will 
not be visible outside of this definition or declaration
     struct timeval *tv,

=====

I think the reason for this is that the struct timeval isn't declared anywhere 
before the declaration of this function. For me on windows, the structure is 
defined inside of winsock.h and including it before the other python header 
files fixes the problem.

----------
components: Windows
messages: 355932
nosy: Mithil, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: struct timeval is not declared
type: compile error
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38682>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to