@@ -36,7 +36,7 @@ static int uv__pthread_setname_np(const char* name) {
36
36
int err ;
37
37
38
38
/* pthread_setname_np() first appeared in OS X 10.6 and iOS 3.2. */
39
- dynamic_pthread_setname_np = dlsym (RTLD_DEFAULT , "pthread_setname_np" );
39
+ * ( void * * )( & dynamic_pthread_setname_np ) = dlsym (RTLD_DEFAULT , "pthread_setname_np" );
40
40
if (dynamic_pthread_setname_np == NULL )
41
41
return - ENOSYS ;
42
42
@@ -94,13 +94,13 @@ int uv__set_process_title(const char* title) {
94
94
if (application_services_handle == NULL || core_foundation_handle == NULL )
95
95
goto out ;
96
96
97
- pCFStringCreateWithCString =
97
+ * ( void * * )( & pCFStringCreateWithCString ) =
98
98
dlsym (core_foundation_handle , "CFStringCreateWithCString" );
99
- pCFBundleGetBundleWithIdentifier =
99
+ * ( void * * )( & pCFBundleGetBundleWithIdentifier ) =
100
100
dlsym (core_foundation_handle , "CFBundleGetBundleWithIdentifier" );
101
- pCFBundleGetDataPointerForName =
101
+ * ( void * * )( & pCFBundleGetDataPointerForName ) =
102
102
dlsym (core_foundation_handle , "CFBundleGetDataPointerForName" );
103
- pCFBundleGetFunctionPointerForName =
103
+ * ( void * * )( & pCFBundleGetFunctionPointerForName ) =
104
104
dlsym (core_foundation_handle , "CFBundleGetFunctionPointerForName" );
105
105
106
106
if (pCFStringCreateWithCString == NULL ||
@@ -118,14 +118,14 @@ int uv__set_process_title(const char* title) {
118
118
if (launch_services_bundle == NULL )
119
119
goto out ;
120
120
121
- pLSGetCurrentApplicationASN =
121
+ * ( void * * )( & pLSGetCurrentApplicationASN ) =
122
122
pCFBundleGetFunctionPointerForName (launch_services_bundle ,
123
123
S ("_LSGetCurrentApplicationASN" ));
124
124
125
125
if (pLSGetCurrentApplicationASN == NULL )
126
126
goto out ;
127
127
128
- pLSSetApplicationInformationItem =
128
+ * ( void * * )( & pLSSetApplicationInformationItem ) =
129
129
pCFBundleGetFunctionPointerForName (launch_services_bundle ,
130
130
S ("_LSSetApplicationInformationItem" ));
131
131
@@ -138,9 +138,9 @@ int uv__set_process_title(const char* title) {
138
138
if (display_name_key == NULL || * display_name_key == NULL )
139
139
goto out ;
140
140
141
- pCFBundleGetInfoDictionary = dlsym (core_foundation_handle ,
141
+ * ( void * * )( & pCFBundleGetInfoDictionary ) = dlsym (core_foundation_handle ,
142
142
"CFBundleGetInfoDictionary" );
143
- pCFBundleGetMainBundle = dlsym (core_foundation_handle ,
143
+ * ( void * * )( & pCFBundleGetMainBundle ) = dlsym (core_foundation_handle ,
144
144
"CFBundleGetMainBundle" );
145
145
if (pCFBundleGetInfoDictionary == NULL || pCFBundleGetMainBundle == NULL )
146
146
goto out ;
@@ -152,13 +152,13 @@ int uv__set_process_title(const char* title) {
152
152
if (hi_services_bundle == NULL )
153
153
goto out ;
154
154
155
- pSetApplicationIsDaemon = pCFBundleGetFunctionPointerForName (
155
+ * ( void * * )( & pSetApplicationIsDaemon ) = pCFBundleGetFunctionPointerForName (
156
156
hi_services_bundle ,
157
157
S ("SetApplicationIsDaemon" ));
158
- pLSApplicationCheckIn = pCFBundleGetFunctionPointerForName (
158
+ * ( void * * )( & pLSApplicationCheckIn ) = pCFBundleGetFunctionPointerForName (
159
159
launch_services_bundle ,
160
160
S ("_LSApplicationCheckIn" ));
161
- pLSSetApplicationLaunchServicesServerConnectionStatus =
161
+ * ( void * * )( & pLSSetApplicationLaunchServicesServerConnectionStatus ) =
162
162
pCFBundleGetFunctionPointerForName (
163
163
launch_services_bundle ,
164
164
S ("_LSSetApplicationLaunchServicesServerConnectionStatus" ));
0 commit comments