summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-10-25 12:31:44 +0200
committerJim Meyering <meyering@redhat.com>2011-10-25 12:31:49 +0200
commit22f3b2e9602f138b6bf4a45d50fa777c9fe782c5 (patch)
tree2db7a21ae7f178b228896dfe8d4642049eacfc87 /src
parent5bb6316bd71f3a52990a57d94203d8855e4b6b90 (diff)
downloadcoreutils-22f3b2e9602f138b6bf4a45d50fa777c9fe782c5.tar.xz
build: do not remove definition of ENODATA, after all
* src/system.h (ENODATA): Restore definition. gnulib defines it only on native Windows systems, so removing our definition would have provoked build failure on systems that use it, like FreeBSD. Reported by Bruno Haible in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739/focus=28795 * gnulib: Update to latest, to get new ENODATA-exempting maint.mk rule.
Diffstat (limited to 'src')
-rw-r--r--src/system.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h
index 19421a9dd..926def957 100644
--- a/src/system.h
+++ b/src/system.h
@@ -76,6 +76,14 @@ you must include <sys/types.h> before including this file
#include <string.h>
#include <errno.h>
+
+/* Some systems don't define this; POSIX mentions it but says it is
+ obsolete. gnulib defines it, but only on native Windows systems,
+ and there only because MSVC 10 does. */
+#ifndef ENODATA
+# define ENODATA (-1)
+#endif
+
#include <stdbool.h>
#include <stdlib.h>
#include "version.h"