Changeset 24828


Ignore:
Timestamp:
2010-12-26T01:53:40+01:00 (7 years ago)
Author:
jow
Message:

[packages] procps: the recently added "HZ fix" introduces constructor priorities which GCC < 4.0 does not support, protect those with a gcc version check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/utils/procps/patches/020_hz_fix.patch

    r23943 r24828  
    11--- a/proc/sysinfo.c 
    22+++ b/proc/sysinfo.c 
    3 @@ -209,7 +209,7 @@ static int check_for_privs(void){ 
     3@@ -209,7 +209,12 @@ static int check_for_privs(void){ 
    44   return !!rc; 
    55 } 
    66  
    7 -static void init_libproc(void) __attribute__((constructor)); 
     7+#if __GNUC__ < 4 
     8 static void init_libproc(void) __attribute__((constructor)); 
     9+#else 
    810+static void init_libproc(void) __attribute__((constructor(200))); 
     11+#endif 
     12+ 
    913 static void init_libproc(void){ 
    1014   have_privs = check_for_privs(); 
     
    1216--- a/proc/version.c 
    1317+++ b/proc/version.c 
    14 @@ -33,7 +33,7 @@ void display_version(void) { 
     18@@ -33,7 +33,12 @@ void display_version(void) { 
    1519  
    1620 int linux_version_code; 
    1721  
    18 -static void init_Linux_version(void) __attribute__((constructor)); 
     22+#if __GNUC__ < 4 
     23 static void init_Linux_version(void) __attribute__((constructor)); 
     24+#else 
    1925+static void init_Linux_version(void) __attribute__((constructor(100))); 
     26+#endif 
     27+ 
    2028 static void init_Linux_version(void) { 
    2129     static struct utsname uts; 
Note: See TracChangeset for help on using the changeset viewer.