linux-sgx/0015-Fix-modern-C-function-prototype-compliance.patch
Daniel P. Berrangé b26306ecae Honour CFLAGS/CXXFLAGS/LDFLAGS for host software
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-04-16 15:44:33 +01:00

44 lines
1.9 KiB
Diff

From f70028402c31652c65277291e93b4c565c8863ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Mon, 31 Mar 2025 10:55:25 +0100
Subject: [PATCH 15/16] Fix modern C function prototype compliance
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
common/inc/internal/se_cdefs.h | 2 +-
sdk/debugger_interface/linux/se_ptrace.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/inc/internal/se_cdefs.h b/common/inc/internal/se_cdefs.h
index edbe25fa..76083b02 100644
--- a/common/inc/internal/se_cdefs.h
+++ b/common/inc/internal/se_cdefs.h
@@ -94,7 +94,7 @@
#define SGX_ACCESS_VERSION(libname, num) \
MY_EXTERN char sgx_##libname##_version[]; \
- MY_EXTERN char * __attribute__((destructor)) libname##_access_version_dummy##num() \
+ MY_EXTERN char * __attribute__((destructor)) libname##_access_version_dummy##num(void) \
{ \
sgx_##libname##_version[0] = 's'; \
return sgx_##libname##_version; \
diff --git a/sdk/debugger_interface/linux/se_ptrace.c b/sdk/debugger_interface/linux/se_ptrace.c
index 8e4e7600..8c38bb68 100644
--- a/sdk/debugger_interface/linux/se_ptrace.c
+++ b/sdk/debugger_interface/linux/se_ptrace.c
@@ -76,7 +76,7 @@ typedef pid_t (*waitpid_t)(pid_t pid, int *status, int options);
static ptrace_t g_sys_ptrace = NULL;
static waitpid_t g_sys_waitpid = NULL;
-__attribute__((constructor)) void init()
+__attribute__((constructor)) void init(void)
{
g_sys_ptrace = (ptrace_t)dlsym(RTLD_NEXT, "ptrace");
g_sys_waitpid = (waitpid_t)dlsym(RTLD_NEXT, "waitpid");
--
2.48.1