source: packages/utils/procps/patches/020_hz_fix.patch @ 27585

Last change on this file since 27585 was 27585, checked in by jow, 5 years ago

[packages] procps: attribute((constructor)) needs an arg for gcc >= 4.3, fixes procps compilation on backfire

File size: 1.3 KB
  • proc/sysinfo.c

    a b static int check_for_privs(void){ 
    209209  return !!rc; 
    210210} 
    211211 
     212#if __GNUC__ < 4 || __GNUC_MINOR__ < 3 
    212213static void init_libproc(void) __attribute__((constructor)); 
     214#else 
     215static void init_libproc(void) __attribute__((constructor(200))); 
     216#endif 
     217 
    213218static void init_libproc(void){ 
    214219  have_privs = check_for_privs(); 
    215220  // ought to count CPUs in /proc/stat instead of relying 
  • proc/version.c

    a b void display_version(void) { 
    3333 
    3434int linux_version_code; 
    3535 
     36#if __GNUC__ < 4 || __GNUC_MINOR__ < 3 
    3637static void init_Linux_version(void) __attribute__((constructor)); 
     38#else 
     39static void init_Linux_version(void) __attribute__((constructor(100))); 
     40#endif 
     41 
    3742static void init_Linux_version(void) { 
    3843    static struct utsname uts; 
    3944    int x = 0, y = 0, z = 0;    /* cleared in case sscanf() < 3 */ 
  • proc/module.mk

    a b proc/$(ANAME): $(LIBOBJ) 
    7676 
    7777#proc/$(SONAME): proc/library.map 
    7878proc/$(SONAME): $(LIBOBJ) 
    79         $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $^ -lc 
     79        $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $(sort $^) -lc 
    8080 
    8181 
    8282# AUTOMATIC DEPENDENCY GENERATION -- GCC AND GNUMAKE DEPENDENT 
Note: See TracBrowser for help on using the repository browser.