ci: attempt to fix win builds
authorMichael Wallner <mike@php.net>
Sun, 20 Dec 2020 14:05:09 +0000 (15:05 +0100)
committerMichael Wallner <mike@php.net>
Sun, 20 Dec 2020 14:05:09 +0000 (15:05 +0100)
include/libmemcached-1/platform.h
src/p9y/p9y.cpp

index bfc05e351f1e1da9328c6af0472595e8463d8930..c0223392f60b59ad083ec8927a93ae36c5a4fb86 100644 (file)
@@ -56,6 +56,12 @@ typedef long int ssize_t;
 # include <winsock2.h>
 # include <ws2tcpip.h>
 typedef SOCKET memcached_socket_t;
+# if !defined POLLIN
+#  define POLLIN (POLLRDNORM|POLLRDBAND)
+# endif
+# if !defined POLLOUT
+#  define POLLOUT (POLLWRNORM)
+# endif
 #else
 typedef int memcached_socket_t;
 #endif // _WIN32
index 1c5c4ac982206582f005fae8d5319d02c3cd654a..c9927495ebe4b5aceeca3917389d47c18f5709a6 100644 (file)
@@ -1,6 +1,7 @@
 #include "libgen.hpp"
 #if defined P9Y_NEED_BASENAME
 # if defined _WIN32
+# include <cstring>
 char *basename(const char *filename) {
   static char base[_MAX_PATH * 2], ext[_MAX_PATH], *ptr;
   (void) _splitpath_s(filename, NULL, 0, NULL, 0, base, _MAX_PATH, ext, _MAX_PATH);