DJ Lucas wrote:
Ran into difficulties tonight. Need to protect against kernel types
that conflict with glibc in linux/types.h.
From llh:
....
#include <sys/types.h>
#include <linux/posix_types.h>
#include <asm/types.h>
#ifndef __KERNEL_STRICT_NAMES
typedef __u32 __kernel_dev_t;
#if defined(WANT_KERNEL_TYPES) || !defined(__GLIBC__)
typedef __kernel_fd_set fd_set; /* <sys/select.h> */
typedef __kernel_dev_t dev_t; /* <sys/stat.h>,
<sys/types.h> */
typedef __kernel_ino_t ino_t; /* <dirent.h>,
<sys/stat.h>, <sys/types.h> */
typedef __kernel_mode_t mode_t; /* <sys/ipc.h>,
<sys/mman.h>, <sys/stat.h>, <sys/types.h> */
typedef __kernel_nlink_t nlink_t; /* <sys/stat.h>,
<sys/types.h> */
typedef __kernel_off_t off_t; /* <unistd.h>,
<sys/mman.h>, <sys/stat.h>, <sys/types.h> */
typedef __kernel_pid_t pid_t; /* <signal.h>,
<time.h>, <unistd.h>... (lots) */
typedef __kernel_daddr_t daddr_t; /* <sys/types.h> */
typedef __kernel_key_t key_t; /* <sys/ipc.h>,
<sys/types.h> */typedef __kernel_suseconds_t suseconds_t; /*
<sys/select.h>, <sys/time.h>, <sys/types.h> */
typedef __kernel_timer_t timer_t; /* <time.h> [also from
<sys/types.h>] */
typedef __kernel_clockid_t clockid_t; /* <time.h> [also from
<sys/types.h>] */
typedef __kernel_mqd_t mqd_t;
typedef __kernel_uid_t uid_t; /* <pwd.h>,
<signal.h>, <strops.h>... (lots) */
typedef __kernel_gid_t gid_t; /* <grp.h>, <pwd.h>,
<strops.h>... (lots) */
....
I have exactly three instances of 'WANT_KERNEL_TYPES' in my
/usr/include tree. :-) I'm honestly not sure why they wern't ripped
out completely unless that is something that was PLD specific that was
slipped in there as it really doesn't hurt. Might want to check
Redhat, Gentoo, Debian, ... sets to see what they do. The quick
solution for xorg-server was to remove both instances of linux/types.h
in lnx_agp.c. I chose to add the same protected ifdef to
linux/types.h and drag in sys/types.h.
I don't see any of these references in sys/types.h, or am I missing
something.
--
------
[EMAIL PROTECTED]
[EMAIL PROTECTED]
LFS User # 2577
Registered Linux User # 299986
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page