[libiberty] Allow setproctitle.c to compile on IRIX 6.5

Submitted by Rainer Orth on Nov. 29, 2010, 10:19 a.m.

Details

Message ID ydd1v64qvo9.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Nov. 29, 2010, 10:19 a.m.
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>.

Patch hide | download patch | download mbox

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