Ticket #521: boinc-kfreebsd-mem.patch

File boinc-kfreebsd-mem.patch, 3.1 KB (added by fthomas, 16 years ago)

This patch applies to BOINC 5.10.27.

  • client/hostinfo_unix.C

    diff -Nru boinc-5.10.27.orig/client/hostinfo_unix.C boinc-5.10.27/client/hostinfo_unix.C
    old new  
    132132    time_data = localtime( &cur_time );
    133133    // tm_gmtoff is already adjusted for daylight savings time
    134134    return time_data->tm_gmtoff;
    135 #elif defined(linux)
     135#elif defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
    136136    return -1*(__timezone);
    137137#elif defined(__CYGWIN32__)
    138138    return -1*(_timezone);
     
    173173  CFRelease(list);
    174174  return(retval);
    175175
    176 #elif defined(linux)
     176#elif defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
    177177    bool    retval = false;
    178178
    179179    FILE* fapm = fopen("/proc/apm", "r");
     
    237237#endif
    238238}
    239239
    240 #ifdef linux
     240#if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
    241241static void parse_meminfo_linux(HOST_INFO& host) {
    242242    char buf[256];
    243243    double x;
     
    449449    strlcpy(host.p_model, model_buf, sizeof(host.p_model));
    450450    fclose(f);
    451451}
    452 #endif  // linux
     452#endif  // __linux__ || __GNU__ || __GLIBC__
    453453
    454454#ifdef __APPLE__
    455455static void get_cpu_info_maxosx(HOST_INFO& host) {
     
    520520    get_filesystem_info(d_total, d_free);
    521521
    522522///////////// p_vendor, p_model, p_features /////////////////
    523 #ifdef linux
     523#if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
    524524    parse_cpuinfo_linux(*this);
    525525#elif defined( __APPLE__)
    526526    int mib[2];
     
    604604        DosQuerySysInfo( QSV_TOTAVAILMEM, QSV_TOTAVAILMEM, &ulMem, sizeof(ulMem));
    605605        m_swap = ulMem;
    606606    }
    607 #elif defined(linux)
     607#elif defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
    608608    parse_meminfo_linux(*this);
    609609#elif defined(_SC_USEABLE_MEMORY)
    610610    // UnixWare
  • client/main.C

    diff -Nru boinc-5.10.27.orig/client/main.C boinc-5.10.27/client/main.C
    old new  
    641641            break;
    642642        }
    643643    }
    644 #elif defined linux
     644#elif defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
    645645    int i;
    646646   
    647647    for (i=1; i<argc; i++) {
     
    734734            "To change ownership/permission, reinstall BOINC"
    735735#ifdef __APPLE__
    736736            " or run\n the shell script Mac_SA_Secure.sh"
    737 #elif defined linux
     737#elif defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
    738738            " or run\n the shell script secure.sh"
    739739#endif
    740740            ". (Error code %d)\n", i
  • configure.ac

    diff -Nru boinc-5.10.27.orig/configure.ac boinc-5.10.27/configure.ac
    old new  
    230230dnl than subtract them.  If you need to remove something from the list above,
    231231dnl please add it to the lists below...
    232232case ${target} in
    233         *-linux*)       STATIC_LIB_LIST="${STATIC_LIB_LIST} nsl"
     233        *-linux*|*-k*bsd*-gnu)  STATIC_LIB_LIST="${STATIC_LIB_LIST} nsl"
    234234        ;;
    235235        *-solaris*)     STATIC_LIB_LIST="${STATIC_LIB_LIST} X* ssl crypto"
    236236        ;;