Fix compilation with older (before C99) C compilers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d2d049f28a
commit
db36543353
@ -53,6 +53,9 @@ struct MacGSocketData* _GSocket_Get_Mac_Socket(GSocket *socket)
|
|||||||
/* If socket is already created, returns a pointer to the data */
|
/* If socket is already created, returns a pointer to the data */
|
||||||
/* Otherwise, creates socket and returns the pointer */
|
/* Otherwise, creates socket and returns the pointer */
|
||||||
CFSocketContext cont;
|
CFSocketContext cont;
|
||||||
|
CFSocketRef cf;
|
||||||
|
CFRunLoopSourceRef source;
|
||||||
|
|
||||||
struct MacGSocketData* data = (struct MacGSocketData*)socket->m_gui_dependent;
|
struct MacGSocketData* data = (struct MacGSocketData*)socket->m_gui_dependent;
|
||||||
|
|
||||||
if (data && data->source) return data;
|
if (data && data->source) return data;
|
||||||
@ -63,9 +66,9 @@ struct MacGSocketData* _GSocket_Get_Mac_Socket(GSocket *socket)
|
|||||||
cont.release = NULL; cont.copyDescription = NULL;
|
cont.release = NULL; cont.copyDescription = NULL;
|
||||||
cont.info = socket;
|
cont.info = socket;
|
||||||
|
|
||||||
CFSocketRef cf = CFSocketCreateWithNative(NULL, socket->m_fd,
|
cf = CFSocketCreateWithNative(NULL, socket->m_fd,
|
||||||
ALL_CALLBACK_TYPES, Mac_Socket_Callback, &cont);
|
ALL_CALLBACK_TYPES, Mac_Socket_Callback, &cont);
|
||||||
CFRunLoopSourceRef source = CFSocketCreateRunLoopSource(NULL, cf, 0);
|
source = CFSocketCreateRunLoopSource(NULL, cf, 0);
|
||||||
assert(source);
|
assert(source);
|
||||||
socket->m_gui_dependent = (char*)data;
|
socket->m_gui_dependent = (char*)data;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user