File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -170,12 +170,20 @@ if host_system != 'windows'
170
170
171
171
if cc.has_header(' locale.h' )
172
172
conf.set(' HAVE_LOCALE_H' , 1 )
173
- if cc.has_type(' locale_t' , prefix : ' #include <locale.h>' )
173
+ locale_prefix = '''
174
+ #define _GNU_SOURCE
175
+ #include <locale.h>
176
+ '''
177
+ if cc.has_type(' locale_t' , prefix : locale_prefix)
174
178
conf.set(' HAVE_LOCALE_T' , 1 )
175
- if cc.has_function(' newlocale' , prefix : ' #include <locale.h> ' )
179
+ if cc.has_function(' newlocale' , prefix : locale_prefix )
176
180
conf.set(' HAVE_NEWLOCALE' , 1 )
177
181
endif
178
- if cc.has_function(' strerror_l' , prefix : ' #include <string.h>' )
182
+ strerror_l_prefix = '''
183
+ #define _GNU_SOURCE
184
+ #include <string.h>
185
+ '''
186
+ if cc.has_function(' strerror_l' , prefix : strerror_l_prefix)
179
187
conf.set(' HAVE_STRERROR_L' , 1 )
180
188
endif
181
189
endif
You can’t perform that action at this time.
0 commit comments