Sfoglia il codice sorgente

fix 32bit compilation on mac

Jan Tattermusch 9 anni fa
parent
commit
f423b06110
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/core/support/cpu_posix.c

+ 2 - 2
src/core/support/cpu_posix.c

@@ -1,6 +1,6 @@
 /*
 /*
  *
  *
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
  * All rights reserved.
  * All rights reserved.
  *
  *
  * Redistribution and use in source and binary forms, with or without
  * Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,7 @@ static long ncpus = 0;
 
 
 static void init_ncpus() {
 static void init_ncpus() {
   ncpus = sysconf(_SC_NPROCESSORS_ONLN);
   ncpus = sysconf(_SC_NPROCESSORS_ONLN);
-  if (ncpus < 1 || ncpus > UINT32_MAX) {
+  if (ncpus < 1 || ncpus > INT32_MAX) {
     gpr_log(GPR_ERROR, "Cannot determine number of CPUs: assuming 1");
     gpr_log(GPR_ERROR, "Cannot determine number of CPUs: assuming 1");
     ncpus = 1;
     ncpus = 1;
   }
   }