]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/libpopt/0004-vcpkg-fixmsvc.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / libpopt / 0004-vcpkg-fixmsvc.patch
CommitLineData
1e59de90
TL
1diff -Naur a/poptconfig.c b/poptconfig.c
2--- a/poptconfig.c 2009-05-20 16:18:07.000000000 +0300
3+++ b/poptconfig.c 2017-01-21 03:10:17.116120500 +0300
4@@ -141,17 +141,23 @@
5 int poptSaneFile(const char * fn)
6 {
7 struct stat sb;
8- uid_t uid = getuid();
9+#ifndef _MSC_VER
10+ uid_t uid = getuid();
11+#endif // ! _MSC_VER
12
13 if (stat(fn, &sb) == -1)
14 return 1;
15+#ifndef _MSC_VER
16 if ((uid_t)sb.st_uid != uid)
17 return 0;
18+#endif // ! _MSC_VER
19 if (!S_ISREG(sb.st_mode))
20 return 0;
21 /*@-bitwisesigned@*/
22- if (sb.st_mode & (S_IWGRP|S_IWOTH))
23- return 0;
24+#ifndef _MSC_VER
25+ if (sb.st_mode & (S_IWGRP | S_IWOTH))
26+ return 0;
27+#endif // ! _MSC_VER
28 /*@=bitwisesigned@*/
29 return 1;
30 }
31diff -Naur a/popthelp.c b/popthelp.c
32--- a/popthelp.c 2009-08-28 03:06:33.000000000 +0300
33+++ b/popthelp.c 2017-01-21 02:59:26.665695800 +0300
34@@ -10,7 +10,10 @@
35
36 #include "system.h"
37
38-#define POPT_USE_TIOCGWINSZ
39+#ifndef _MSC_VER
40+#define POPT_USE_TIOCGWINSZ
41+#endif
42+
43 #ifdef POPT_USE_TIOCGWINSZ
44 #include <sys/ioctl.h>
45 #endif
46diff -Naur a/system.h b/system.h
47--- a/system.h 2008-12-18 19:09:49.000000000 +0200
48+++ b/system.h 2017-01-21 03:10:59.195367500 +0300
49@@ -100,4 +100,13 @@
50 #endif
51 #define UNUSED(x) x __attribute__((__unused__))
52
53+#if defined(_MSC_VER)
54+#define X_OK 0
55+
56+#include <BaseTsd.h>
57+typedef SSIZE_T ssize_t;
58+
59+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
60+#endif
61+
62 #include "popt.h"