Skip to content
This repository was archived by the owner on May 4, 2024. It is now read-only.

Commit 52dcaa3

Browse files
committed
Drop support for macOS 10.14 and older
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 97a1ef6 commit 52dcaa3

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
## Install
1010

11+
Requires macOS 10.15 or later.
12+
1113
```console
1214
brew install vde
1315

@@ -58,8 +60,6 @@ The following additional files will be installed:
5860

5961
Use `/var/run/vde.bridged.en0.ctl` as the VDE socket path.
6062

61-
Needs macOS 10.15 or later.
62-
6363
## Advanced usage
6464

6565
### Testing without launchd

cli.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
#define VERSION "UNKNOWN"
1313
#endif
1414

15+
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101500
16+
#error "Requires macOS 10.15 or later"
17+
#endif
18+
1519
static void print_usage(const char *argv0) {
1620
printf("Usage: %s [OPTION]... VDESWITCH\n", argv0);
1721
printf("vmnet.framework support for rootless QEMU.\n");
@@ -66,13 +70,7 @@ struct cli_options *cli_options_parse(int argc, char *argv[]) {
6670
} else if (strcmp(optarg, "shared") == 0) {
6771
res->vmnet_mode = VMNET_SHARED_MODE;
6872
} else if (strcmp(optarg, "bridged") == 0) {
69-
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
7073
res->vmnet_mode = VMNET_BRIDGED_MODE;
71-
#else
72-
fprintf(stderr,
73-
"vmnet mode \"bridged\" requires macOS 10.15 or later\n");
74-
goto error;
75-
#endif
7674
} else {
7775
fprintf(stderr, "Unknown vmnet mode \"%s\"\n", optarg);
7876
goto error;
@@ -102,14 +100,12 @@ struct cli_options *cli_options_parse(int argc, char *argv[]) {
102100
goto error;
103101
}
104102
res->vde_switch = strdup(argv[optind]);
105-
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
106103
if (res->vmnet_mode == VMNET_BRIDGED_MODE && res->vmnet_interface == NULL) {
107104
fprintf(
108105
stderr,
109106
"vmnet mode \"bridged\" require --vmnet-interface to be specified\n");
110107
goto error;
111108
}
112-
#endif
113109
return res;
114110
error:
115111
print_usage(argv[0]);

main.c

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
#include "cli.h"
1111

12+
#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101500
13+
#error "Requires macOS 10.15 or later"
14+
#endif
15+
1216
static bool debug = false;
1317

1418
#define DEBUGF(fmt, ...) \

0 commit comments

Comments
 (0)