From 28d7d5ba9348495eaccb22f934f27bc083e5f246 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard <julliard@winehq.org> Date: Tue, 19 Oct 2021 18:53:26 +0200 Subject: [PATCH] loader: Avoid including wine/port.h. Signed-off-by: Alexandre Julliard <julliard@winehq.org> --- loader/main.c | 7 ++++++- loader/preloader.c | 9 ++------- loader/preloader_mac.c | 10 +++------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/loader/main.c b/loader/main.c index 86c2b28263e..fdc77c56162 100644 --- a/loader/main.c +++ b/loader/main.c @@ -19,11 +19,16 @@ */ #include "config.h" -#include "wine/port.h" +#include <fcntl.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <dlfcn.h> #include "main.h" diff --git a/loader/preloader.c b/loader/preloader.c index 86308484182..7bd6afaeb66 100644 --- a/loader/preloader.c +++ b/loader/preloader.c @@ -63,16 +63,13 @@ #ifdef __linux__ #include "config.h" -#include "wine/port.h" #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif +#include <sys/stat.h> #include <fcntl.h> #ifdef HAVE_SYS_MMAN_H # include <sys/mman.h> @@ -80,9 +77,7 @@ #ifdef HAVE_SYS_SYSCALL_H # include <sys/syscall.h> #endif -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif +#include <unistd.h> #ifdef HAVE_ELF_H # include <elf.h> #endif diff --git a/loader/preloader_mac.c b/loader/preloader_mac.c index fc07b7da0ed..23eee44975f 100644 --- a/loader/preloader_mac.c +++ b/loader/preloader_mac.c @@ -25,16 +25,13 @@ #ifdef __APPLE__ #include "config.h" -#include "wine/port.h" #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif +#include <sys/stat.h> #include <fcntl.h> #ifdef HAVE_SYS_MMAN_H # include <sys/mman.h> @@ -42,9 +39,8 @@ #ifdef HAVE_SYS_SYSCALL_H # include <sys/syscall.h> #endif -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif +#include <unistd.h> +#include <dlfcn.h> #ifdef HAVE_MACH_O_LOADER_H #include <mach/thread_status.h> #include <mach-o/loader.h> -- GitLab