LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   glibc change in header file sysdeps/unix/sysv/linux/bits/socket.h (http://www.linuxquestions.org/questions/linux-general-1/glibc-change-in-header-file-sysdeps-unix-sysv-linux-bits-socket-h-663367/)

Bambi535 08-17-2008 07:15 AM

glibc change in header file sysdeps/unix/sysv/linux/bits/socket.h
 
Hi,
I tried to compile cups-1.2.4-11.18.el5_2.1.src.rpm on my Fedora 9 desktop (virtual) machine.
It failed where the code referenced
Code:

struct ucred
. This worked fine when I tried it on my (RIP) Fedora Core 6 machine.
After some research I found that there was a change in
Code:

bits/socket.h
whereby the
Code:

struct ucred
was enveloped in
Code:

#ifdef __USE_GNU
.

Anyone knows what was the reasoning for this change?

Thanks,
Opher.

estabroo 08-17-2008 10:57 AM

Most likely because it's a gnu extended structure rather than a posix one. You should be able to add a define of _GNU_SOURCE to make the compile work. If you look at /usr/include/features.h you can see that define will turn on lots good things including __USE_GNU

knudfl 08-18-2008 11:10 AM

Reason for change ? May be /usr/share/doc/glibc-2.8/CONFORMANCE
is giving kind of explanation. The question can also be asked here :
http://fcp.surfsite.org/modules/newb...ime=1207792293

If you want to compile "old versions" of software for
EL5, CentOS-5 would work (or Fedora 7 and 8 probably)
I would not expect anything but the latest stable
versions of software to be fixed to compile with
gcc 4.3 and glibc 2.8 .
( Fedora 9 uses 'cups-1.3.7-1.fc9.i386.rpm' and
'cups-libs-1.3.7-1.fc9.i386.rpm' )

Regards

Bambi535 08-19-2008 03:26 PM

Quote:

Originally Posted by estabroo (Post 3250616)
Most likely because it's a gnu extended structure rather than a posix one. You should be able to add a define of _GNU_SOURCE to make the compile work. If you look at /usr/include/features.h you can see that define will turn on lots good things including __USE_GNU

Thanks for your reply.
I know that __USE_GNU code is activated with -D_GNU_SOURCE. I was actually interested in the why the change took place in glibc.

Thanks.

Bambi535 08-19-2008 03:45 PM

Quote:

Originally Posted by knudfl (Post 3251590)
Reason for change ? May be /usr/share/doc/glibc-2.8/CONFORMANCE
is giving kind of explanation.

I skimmed through it... did not find it there :(.
Quote:

The question can also be asked here :
http://fcp.surfsite.org/modules/newb...ime=1207792293
That I'll do ;).

Thanks for the reply.


All times are GMT -5. The time now is 06:01 AM.