#3271: Udev/Systemd 197
--------------------+-------------------------------------------------------
 Reporter:  Krejzi  |       Owner:  bdubbs@…                   
     Type:  task    |      Status:  assigned                   
 Priority:  normal  |   Milestone:  7.3                        
Component:  Book    |     Version:  SVN                        
 Severity:  normal  |    Keywords:                             
--------------------+-------------------------------------------------------

Comment(by matthew@…):

 Replying to [comment:2 Krejzi]:
 > How about this?
 >
 > {{{
 > #ifndef secure_getenv
 > #define secure_getenv __secure_getenv
 > #endif
 > }}}

 That's kind of handled by systemd's 'src/shared/missing.h':

 {{{
 #ifndef HAVE_SECURE_GETENV
 #  ifdef HAVE___SECURE_GETENV
 #    define secure_getenv __secure_getenv
 #  else
 #    error neither secure_getenv nor __secure_getenv are available
 #  endif
 #endif
 }}}

 So, what we need in our udev-lfs-197/cfg.h is a similar #ifdef selection,
 I think.  Something like:

 # ifdef (something particular to glibc-2.17)
 #   define HAVE_SECURE_GETENV
 # else
 #   define HAVE___SECURE_GETENV
 # endif

 /usr/include/gnu/libc-version.h defines gnu_get_libc_version() but you'd
 obviously have to compile a C program first to be able to get that info.

 The only way I can see getting around this automatically is to start
 reinventing/reimplementing a portion of Udev's configure machinery, to try
 compiling a small program that calls secure_getenv() first, and if that
 fails, calls '__secure_getenv' and sets the relevant preprocessor macro.

 I wouldn't want to start putting 'if you're using version x of package y,
 then do a), otherwise do b)' type instructions in the book.  We quite
 reasonably assume that folks use the same version of the book during their
 entire build, be that a released or a dated dev version.  Similarly, folks
 reasonably expect us to have tested the versions of the software that
 appear in a particular release against each other.  As such, I can't see a
 requirement leaping out for being able to mix and match packages from
 different versions of the book.  Maybe that's just me not wanting to see
 such a requirement though :-)

-- 
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/3271#comment:4>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to