Fix include portablity (xlocale, stdlib)

This commit is contained in:
Greg V 2018-07-10 13:56:18 +03:00
parent f8b412052e
commit 0e03784e47
2 changed files with 8 additions and 0 deletions

View file

@ -87,6 +87,10 @@ if cc.has_header_symbol('dirent.h', 'versionsort', prefix : prefix)
config_h.set('HAVE_VERSIONSORT', '1')
endif
if cc.has_header('xlocale.h')
config_h.set('HAVE_XLOCALE_H', '1')
endif
# Dependencies
pkgconfig = import('pkgconfig')
dep_udev = dependency('libudev')

View file

@ -31,11 +31,15 @@
#include <errno.h>
#include <limits.h>
#include <locale.h>
#ifdef HAVE_XLOCALE_H
#include <xlocale.h>
#endif
#include <math.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>