This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libiberty] Allow setproctitle.c to compile on IRIX 6.5
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Nov 2010 11:19:18 +0100
- Subject: [libiberty] Allow setproctitle.c to compile on IRIX 6.5
libiberty/setproctitle.c fails to compile on IRIX 6.5 when <sys/types.h>
isn't included, as also documented in prctl(2). This patch fixes it and
allows the bootstrap to finish. Since <sys/types.h> is included
elsewhere without guard, this should be safe.
Installed as obvious.
Rainer
2010-11-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* setproctitle.c [HAVE_SYS_PRCTL_H]: Include <sys/types.h>.
diff -r 88967570c6e8 libiberty/setproctitle.c
--- a/libiberty/setproctitle.c Sat Nov 27 11:13:47 2010 +0100
+++ b/libiberty/setproctitle.c Sat Nov 27 11:14:56 2010 +0100
@@ -20,6 +20,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_SYS_PRCTL_H
+#include <sys/types.h>
#include <sys/prctl.h>
#endif
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University