[collectd-changes] collectd, the system statistics collection daemon: Changes to 'collectd-4.9'

Florian Forster octo at verplant.org
Sat Sep 11 11:08:57 CEST 2010


 configure.in |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

New commits:
commit 13cbf9d48f26083e29e07c1b59ad1d67b6efa147
Author: Aurelien Reynaud <collectd at wattapower.net>
Date:   Sat Jun 19 20:03:52 2010 +0200

    Fix errno thread-safety under AIX
    
    Unlike Linux or Solaris, errno under AIX is not thread-safe by
    default.
    
    This patch sets _THREAD_SAFE_ERRNO when AIX is detected in order to
    force the thread-safe implementation of errno. Without this, calls
    like stat() in the rrdtool plugin fail with errno incorrectly set,
    leading to the inability to create previously absent rrd files.
    
    Maybe _THREAD_SAFE should be set instead, to prevent other possible
    threads-related problems, but this is enough to scratch my current
    itch...
    
    Here is the relevant part of /usr/include/errno.h on AIX:
    
     #if defined(_THREAD_SAFE) || defined(_THREAD_SAFE_ERRNO)
     /*
      * Per thread errno is provided by the threads provider. Both the extern
      * int
      * and the per thread value must be maintained by the threads library.
      */
     extern  int     *_Errno( void );
     #define errno   (*_Errno())
    
     #else
    
     extern int errno;
    
     #endif  /* _THREAD_SAFE || _THREAD_SAFE_ERRNO */
    
    Signed-off-by: Aurelien Reynaud <collectd at wattapower.net>
    Signed-off-by: Florian Forster <octo at huhu.verplant.org>




More information about the collectd-changes mailing list