Skip to content

Commit 87042fa

Browse files
AMDmi3caclark
authored andcommitted
Detect strverscmp support properly
1 parent ea6be8a commit 87042fa

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

config.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
#define HAVE_STRING_H 1
162162

163163
/* Define to 1 if you have the `strverscmp' function. */
164-
#define HAVE_STRVERSCMP 1
164+
#mesondefine HAVE_STRVERSCMP
165165

166166
/* Define to 1 if you have the <sys/stat.h> header file. */
167167
#define HAVE_SYS_STAT_H 1

meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,11 @@ else
446446
summary({'nl_langinfo' : ['nl_langinfo not found - first weekday depends on locale:', false, 'first weekday defaults to Monday']}, section : 'Documentation', bool_yn : true)
447447
endif
448448

449+
result = cc.has_function('strverscmp', prefix : '#include <string.h>')
450+
if result
451+
conf_data.set('HAVE_STRVERSCMP', 1)
452+
endif
453+
449454
conf_data.set_quoted('GETTEXT_PACKAGE', meson.project_name())
450455
conf_data.set_quoted('GQ_APPDIR', gq_appdir)
451456
conf_data.set_quoted('GQ_BINDIR', gq_bindir)

0 commit comments

Comments
 (0)