summaryrefslogtreecommitdiff
path: root/common/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/compat.h')
-rw-r--r--common/compat.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/compat.h b/common/compat.h
index 86a9e04..bd6078a 100644
--- a/common/compat.h
+++ b/common/compat.h
@@ -20,6 +20,8 @@
#ifndef _COMPAT_H_
#define _COMPAT_H_
+#define _GNU_SOURCE
+
/* Force use of win32 configuration if compiling there */
#ifdef _WIN32
#include "../config.win32.h"
@@ -156,7 +158,9 @@ extern int optind, opterr, optopt;
int getopt(int nargc, char* const* nargv, const char* ostr);
#endif
-#ifndef HAVE_ERR_H
+#ifdef HAVE_ERR_H
+#include <err.h>
+#else
#include <stdarg.h>
void err_set_file(void *fp);
void err_set_exit(void (*ef)(int));