Skip to content

Commit

Permalink
Merge pull request #110 from Jan-E/win32-stdint
Browse files Browse the repository at this point in the history
[Windows] Fix PHP 8+ compatibility
  • Loading branch information
tomassrnka committed May 4, 2023
2 parents 218e617 + 7e7fb52 commit f15988d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 9 additions & 5 deletions src/memcache_binary_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@
#define MMC_DEBUG 0

#ifdef PHP_WIN32
#include <win32/php_stdint.h>
#include <winsock2.h>
# if defined(_MSC_VER) && _MSC_VER < 1920
# include "win32/php_stdint.h"
# else
# include <stdint.h>
# endif
# include <winsock2.h>
#else
#include <stdint.h>
#include <arpa/inet.h>
#include <netinet/in.h>
# include <stdint.h>
# include <arpa/inet.h>
# include <netinet/in.h>
#endif
#include "memcache_pool.h"
#include "ext/standard/php_smart_string.h"
Expand Down
8 changes: 6 additions & 2 deletions src/memcache_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@
#endif

#ifdef PHP_WIN32
#include <win32/php_stdint.h>
# if defined(_MSC_VER) && _MSC_VER < 1920
# include "win32/php_stdint.h"
# else
# include <stdint.h>
# endif
#else
#include <stdint.h>
# include <stdint.h>
#endif
#include <string.h>

Expand Down

0 comments on commit f15988d

Please sign in to comment.