From f4f3de8be9e0a5228c7e4f2514e0163939ae319c Mon Sep 17 00:00:00 2001 From: norohind <60548839+norohind@users.noreply.github.com> Date: Sat, 15 Oct 2022 01:52:13 +0300 Subject: [PATCH] Make termux buildable, uses clang --- Makefile | 4 ++-- src/main.cpp | 4 ++-- src/tun.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 332f3d4..c8203e6 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,8 @@ LDFLAGS = `sh osflags ld $(MODE)` CFLAGS = -c -g `sh osflags c $(MODE)` CPPFLAGS = -c -g -std=c++98 -pedantic -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers `sh osflags c $(MODE)` TUN_DEV_FILE = `sh osflags dev $(MODE)` -GCC = gcc -GPP = g++ +GCC = clang +GPP = clang++ .PHONY: directories diff --git a/src/main.cpp b/src/main.cpp index 99b1226..bc6b5e2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,9 +37,9 @@ #include #include -#ifndef AI_V4MAPPED // Not supported on OpenBSD 6.0 +// #ifndef AI_V4MAPPED // Not supported on OpenBSD 6.0 #define AI_V4MAPPED 0 -#endif +// #endif using std::string; diff --git a/src/tun.cpp b/src/tun.cpp index 0cedb3e..c39f800 100644 --- a/src/tun.cpp +++ b/src/tun.cpp @@ -54,7 +54,7 @@ static void winsystem(char *cmd) } #endif -#define ip_path "/sbin/ip " +#define ip_path "/data/data/com.termux/files/usr/bin/ip " Tun::Tun(const string *device, int mtu) {