Skip to content

Commit 4906ed9

Browse files
committed
[linux] define _GNU_SOURCE for process_vm_readv
1 parent 59d39a1 commit 4906ed9

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

tools/swift-inspect/Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ let package = Package(
2727
name: "SwiftInspectLinux",
2828
dependencies: ["LinuxSystemHeaders"],
2929
path: "Sources/SwiftInspectLinux",
30-
exclude: ["SystemHeaders"]),
30+
exclude: ["SystemHeaders"],
31+
cSettings: [.define("_GNU_SOURCE", to: "1")]),
3132
.systemLibrary(
3233
name: "LinuxSystemHeaders",
3334
path: "Sources/SwiftInspectLinux/SystemHeaders"),

tools/swift-inspect/Sources/SwiftInspectLinux/SystemHeaders/uio.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,3 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#include <sys/uio.h>
14-
15-
// process_vm_readv/writeva are available in glibc but are not in the headers
16-
// provided with the Swift toolchain
17-
ssize_t process_vm_readv(pid_t, const struct iovec*, unsigned long,
18-
const struct iovec*, unsigned long, unsigned long);
19-
ssize_t process_vm_writev(pid_t, const struct iovec*, unsigned long,
20-
const struct iovec*, unsigned long, unsigned long);

0 commit comments

Comments
 (0)