Skip to content

Commit 70679f5

Browse files
committed
correct pid_t <-> DWORD
1 parent fe59db4 commit 70679f5

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

app/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static bool no_arg(std::string_view fun){
5252
{"has_statx", fs_has_statx}
5353
};
5454

55-
using fs_function = std::function<std::variant<std::string, bool, int, char, long, std::size_t>()>;
55+
using fs_function = std::function<std::variant<std::string, bool, int, char, long, pid_t, std::size_t>()>;
5656

5757
std::unordered_map<std::string_view, fs_function> fs_function_map = {
5858
{"backend", []() { return fs_backend(); }},

include/ffilesystem.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
#define FFILESYSTEM_H
33

44
#include <sys/types.h> // for pid_t
5-
#ifdef _WIN32
6-
#define WIN32_LEAN_AND_MEAN
7-
#include <IntSafe.h>
8-
// windef.h makes errors with Visual Studio generator
5+
6+
#ifdef _MSC_VER
7+
8+
#ifndef DWORD
9+
typedef unsigned long DWORD;
10+
#endif
11+
912
#ifndef pid_t
1013
#define pid_t DWORD
1114
#endif
15+
1216
#endif
1317

1418
#ifdef __cplusplus

0 commit comments

Comments
 (0)