summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/compat.h6
-rw-r--r--common/usuals.h2
2 files changed, 7 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));
diff --git a/common/usuals.h b/common/usuals.h
index d09fd72..5bd7b98 100644
--- a/common/usuals.h
+++ b/common/usuals.h
@@ -20,6 +20,8 @@
#ifndef __USUALS_H__20000613
#define __USUALS_H__20000613
+#define _GNU_SOURCE
+
#include <sys/types.h>
#include <string.h>
#include <stdlib.h>