]> granicus.if.org Git - libevent/commitdiff
Fix https-client compilation on Windows.
authorJoakim Soderberg <joakim.soderberg@gmail.com>
Wed, 22 Jan 2014 10:15:17 +0000 (11:15 +0100)
committerJoakim Soderberg <joakim.soderberg@gmail.com>
Wed, 22 Jan 2014 10:15:17 +0000 (11:15 +0100)
ssize_t is not defined. But using ssize_t for s in this context makes no
sense, since fread returns size_t.

sample/https-client.c

index 3721378b2203d41216e79b8cf8b8f25390f03469..e13ac4bd342f51cfc2369f2437cdade828a8933d 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 // Get rid of OSX 10.7 and greater deprecation warnings.
-#ifdef __clang__
+#if defined(__APPLE__) && defined(__clang__)
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
 #endif
 
@@ -390,7 +390,7 @@ main(int argc, char **argv)
                 * avoid needless copying. */
                FILE * f = fopen(data_file, "rb");
                char buf[1024];
-               ssize_t s;
+               size_t s;
                size_t bytes = 0;
 
                if (!f) {