Message ID | 20101215060727.GC2618@adacore.com |
---|---|
State | New |
Headers | show |
Hello Joel, * Joel Brobecker wrote on Wed, Dec 15, 2010 at 07:07:27AM CET: > A friendly request for a small patch posted about 3 weeks ago... > Thank you! I think your patch has already been obsoleted by this one in trunk: 2010-11-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * setproctitle.c [HAVE_SYS_PRCTL_H]: Include <sys/types.h>. > On Tue, Nov 23, 2010 at 08:54:18AM -0800, Joel Brobecker wrote: > libiberty/ChangeLog: > > * setproctitle.c: If <sys/types.h> exists, include it before including > <sys/prctl.h>. Cheers, Ralf
> I think your patch has already been obsoleted by this one in trunk: > > 2010-11-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > > * setproctitle.c [HAVE_SYS_PRCTL_H]: Include <sys/types.h>. Indeed! I was a little surprised to see that it's included unconditionally, but I suppose that <sys/types.h> is expected to always be present on platforms that have <sys/prctl.h>. Thank you!
Joel Brobecker <brobecker@adacore.com> writes: >> I think your patch has already been obsoleted by this one in trunk: >> >> 2010-11-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> >> >> * setproctitle.c [HAVE_SYS_PRCTL_H]: Include <sys/types.h>. > > Indeed! I was a little surprised to see that it's included > unconditionally, but I suppose that <sys/types.h> is expected to > always be present on platforms that have <sys/prctl.h>. Not only that, it's included in all libiberty sources unconditionally, so I concluded there's no problem doing so here :-) Rainer
diff --git a/libiberty/setproctitle.c b/libiberty/setproctitle.c index ceb0a38..dfcf000 100644 --- a/libiberty/setproctitle.c +++ b/libiberty/setproctitle.c @@ -21,6 +21,9 @@ Boston, MA 02110-1301, USA. */ #include "config.h" #endif #ifdef HAVE_SYS_PRCTL_H +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif #include <sys/prctl.h> #endif #include "ansidecl.h"