awesomized / libmemcached

Resurrection of libmemcached
https://awesomized.github.io/libmemcached/
BSD 3-Clause "New" or "Revised" License
45 stars 26 forks source link

Use of <cinttypes> in memcache.h is C++11 specific #57

Closed m6w6 closed 4 years ago

m6w6 commented 4 years ago

Imported from Launchpad using lp2gh.


I have it on good authority (including gcc-4.4.6 on CentOS-6.2) that wasn't added until C++11. Seems like using instead would address that simply. (Unless the expectation is that C++11 is required.)

diff --git a/libmemcached-1.0/memcached.h b/libmemcached-1.0/memcached.h
index bc16e73..b258fbe 100644
--- a/libmemcached-1.0/memcached.h
+++ b/libmemcached-1.0/memcached.h
@@ -42,12 +42,12 @@
 #  define __STDC_FORMAT_MACROS
 #endif

+#include <inttypes.h>
+
 #ifdef __cplusplus
-#  include <cinttypes>
 #  include <cstddef>
 #  include <cstdlib>
 #else
-#  include <inttypes.h>
 #  include <stddef.h>
 #  include <stdlib.h>
 #  include <stdbool.h>