From 692c71a6778aa317349bdf568fb3aba7c6c6ff53 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 10 Oct 2025 12:11:06 -0700
Subject: [PATCH] The dlopen note functionality is only used on UNIX platforms
---
include/SDL3/SDL_dlopennote.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/SDL3/SDL_dlopennote.h b/include/SDL3/SDL_dlopennote.h
index a12ddbd7e78b2..36a0607f80d57 100644
--- a/include/SDL3/SDL_dlopennote.h
+++ b/include/SDL3/SDL_dlopennote.h
@@ -93,6 +93,13 @@
#define SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED "required"
+#if !defined(SDL_PLATFORM_UNIX) || defined(SDL_PLATFORM_ANDROID)
+/* The dlopen note functionality isn't used on this platform */
+#ifndef SDL_DISABLE_DLOPEN_NOTES
+#define SDL_DISABLE_DLOPEN_NOTES
+#endif
+#endif /* SDL_PLATFORM_UNIX || SDL_PLATFORM_ANDROID */
+
#if defined(__ELF__) && !defined(SDL_DISABLE_DLOPEN_NOTES)
#include <SDL3/SDL_stdinc.h>