[systemd-devel] PATCH: add missing header include

Alexey Shabalin a.shabalin at gmail.com
Fri Jun 1 09:35:24 PDT 2012


2011/8/19 Lennart Poettering <lennart at poettering.net>:
> On Thu, 18.08.11 16:18, Frederic Crozat (fcrozat at suse.com) wrote:
>
>> Le jeudi 18 août 2011 à 16:00 +0200, Lennart Poettering a écrit :
>> > On Thu, 18.08.11 15:50, Frederic Crozat (fcrozat at suse.com) wrote:
>> >
>> > > Hi,
>> > >
>> > > MS_REC is not always defined in sys/mount.h. linux/fs.h should be
>> > > included, since it is always defined there.
>> >
>> > Not always? Can you be more specific please? Which version of glibc is that?
>>
>> Well, I haven't found it on glibc 2.11.3, shipped in latest openSUSE (it
>> was added by Ulrich in 02/2010, see
>> http://sources.redhat.com/bugzilla/show_bug.cgi?id=11235 ie for glib
>> 2.12).
>>
>> Another solution could be to add it to missing.h.
>>
>> I wasn't sure which one was best, since namespace.c is including
>> linux/fs.h, because of MS_REC and MS_MS_UNBINDABLE.
>
> I merged your first patch, looks fine.
>
> I was just curious whether this was some compatibility hack for a
> non-glibc libc. usually my recommendation for those is to ask the libc
> to be fixed, not systemd...
>
> Thanks for the patch,
>
> Lennart


Hi.

mount-setup.c in systemd-184 have the same problem with old glibc:

  CC     src/core/mount-setup.o
src/core/mount-setup.c:64:92: error: 'MS_STRICTATIME' undeclared here
(not in a function)
src/core/mount-setup.c: In function 'mount_setup_early':
src/core/mount-setup.c:161:9: error: duplicate case value
src/core/mount-setup.c:161:9: error: previously used here
make[2]: *** [src/core/mount-setup.o] Error 1

rpm -q glibc
glibc-2.11.3-alt7

-- 
Alexey Shabalin


More information about the systemd-devel mailing list