bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

select.c:496: error: `NULL' undeclared


From: Simon Josefsson
Subject: select.c:496: error: `NULL' undeclared
Date: Mon, 21 May 2012 22:35:14 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.3 (gnu/linux)

I got this error on a IRIX 6.5 system:

checking for sys/select.h... yes
checking whether <sys/select.h> is self-contained... no
checking whether pselect is declared without a macro... no
checking whether select is declared without a macro... no
checking whether select supports a 0 argument... no
...
  CC     select.lo
select.c: In function `rpl_select':
select.c:496: error: `NULL' undeclared (first use in this function)
select.c:496: error: (Each undeclared identifier is reported only once
select.c:496: error: for each function it appears in.)
select.c:500: warning: implicit declaration of function `select'

I pushed the patch below.

/Simon

>From 0b1066b5ab2c8e0e8a8bec718c7eaa8b3a685d89 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <address@hidden>
Date: Mon, 21 May 2012 22:34:41 +0200
Subject: [PATCH] select: Fix build error on IRIX 6.5.

---
 ChangeLog    |    5 +++++
 lib/select.c |    1 +
 2 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 89e2f1d..18cb1a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-05-21  Simon Josefsson  <address@hidden>
 
+       select: Fix build error on IRIX 6.5.
+       * lib/select.c: Include stddef.h for NULL.
+
+2012-05-21  Simon Josefsson  <address@hidden>
+
        gc: fix libgcrypt detection on older machines.
        * m4/gc.m4: Reject libgcrypt earlier than 1.4.4.  Collapse
        copyright years because the file has been distributed every year
diff --git a/lib/select.c b/lib/select.c
index 377d549..7cd6894 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -482,6 +482,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set 
*xfds,
 #else /* ! Native Windows.  */
 
 #include <sys/select.h>
+#include <stddef.h> /* NULL */
 
 #undef select
 
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]