[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-sched build error on CentOS 5
From: |
Bruno Haible |
Subject: |
Re: test-sched build error on CentOS 5 |
Date: |
Mon, 19 Sep 2011 23:51:25 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
Eric Blake wrote:
> Thanks for the report. This is due to a bug in the glibc headers in use
> by CentOS 5, and we should be able to fix our <sched.h> replacement to
> work around that glibc bug (which has since been fixed in upstream glibc).
Yes. I'm applying this workaround.
2011-09-19 Bruno Haible <address@hidden>
sched: Ensure pid_t is defined.
* m4/sched_h.m4 (gl_SCHED_H): Arrange to override <sched.h> if it does
not define pid_t.
* lib/sched.in.h: Include <sys/types.h>.
* doc/posix-headers/sched.texi: Mention the pid_t problem.
Reported by Tom G. Christensen <address@hidden>.
--- doc/posix-headers/sched.texi.orig Mon Sep 19 23:46:57 2011
+++ doc/posix-headers/sched.texi Mon Sep 19 23:42:56 2011
@@ -11,6 +11,9 @@
This header file is missing on some platforms:
Minix 3.1.8, mingw, MSVC 9, BeOS.
@item
+This header file does not define the type @code{pid_t} on some platforms:
+glibc 2.11, MacOS X 10.5.
address@hidden
@code{struct sched_param} is not defined on some platforms:
Haiku.
@item
--- lib/sched.in.h.orig Mon Sep 19 23:46:57 2011
+++ lib/sched.in.h Mon Sep 19 23:46:08 2011
@@ -29,6 +29,12 @@
#ifndef address@hidden@_SCHED_H
#define address@hidden@_SCHED_H
+/* Get pid_t.
+ This is needed on glibc 2.11 (see
+ glibc bug <http://sourceware.org/bugzilla/show_bug.cgi?id=13198>)
+ and MacOS X 10.5. */
+#include <sys/types.h>
+
#if address@hidden@
# if !GNULIB_defined_struct_sched_param
--- m4/sched_h.m4.orig Mon Sep 19 23:46:57 2011
+++ m4/sched_h.m4 Mon Sep 19 23:44:02 2011
@@ -1,4 +1,4 @@
-# sched_h.m4 serial 5
+# sched_h.m4 serial 6
dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -13,6 +13,7 @@
#include <sched.h>
struct sched_param a;
int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+ pid_t t1;
]])],
[SCHED_H=''],
[SCHED_H='sched.h'
--
In memoriam James A. Garfield <http://en.wikipedia.org/wiki/James_A._Garfield>