SDL_net: Add SDLNet_Version to symbol version script

From 0f95bd87075951f83acce9b5b2632d298120db22 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 15 May 2024 22:51:03 +0200
Subject: [PATCH] Add SDLNet_Version to symbol version script

---
 cmake/PrivateSdlFunctions.cmake | 1 +
 src/SDL_net.c                   | 2 +-
 src/SDL_net.sym                 | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cmake/PrivateSdlFunctions.cmake b/cmake/PrivateSdlFunctions.cmake
index 47d820d..3af2b11 100644
--- a/cmake/PrivateSdlFunctions.cmake
+++ b/cmake/PrivateSdlFunctions.cmake
@@ -289,6 +289,7 @@ function(sdl_target_link_option_version_file TARGET VERSION_SCRIPT)
     check_linker_support_version_script(HAVE_WL_VERSION_SCRIPT)
     if(HAVE_WL_VERSION_SCRIPT)
         target_link_options(${TARGET} PRIVATE "-Wl,--version-script=${VERSION_SCRIPT}")
+        set_property(TARGET ${TARGET} APPEND PROPERTY LINK_DEPENDS "${VERSION_SCRIPT}")
     else()
         if(LINUX OR ANDROID)
             message(FATAL_ERROR "Linker does not support '-Wl,--version-script=xxx.sym'. This is required on the current host platform.")
diff --git a/src/SDL_net.c b/src/SDL_net.c
index 9c23779..c013995 100644
--- a/src/SDL_net.c
+++ b/src/SDL_net.c
@@ -86,7 +86,7 @@ typedef enum SDLNet_SocketType
 } SDLNet_SocketType;
 
 
-int SDLNet_LinkedVersion(void)
+int SDLNet_Version(void)
 {
     return SDL_NET_VERSION;
 }
diff --git a/src/SDL_net.sym b/src/SDL_net.sym
index 8ec6c95..4dec23f 100644
--- a/src/SDL_net.sym
+++ b/src/SDL_net.sym
@@ -17,7 +17,6 @@ SDL3_net_0.0.0 {
     SDLNet_GetStreamSocketAddress;
     SDLNet_GetStreamSocketPendingWrites;
     SDLNet_Init;
-    SDLNet_LinkedVersion;
     SDLNet_Quit;
     SDLNet_ReadFromStreamSocket;
     SDLNet_ReceiveDatagram;
@@ -28,6 +27,7 @@ SDL3_net_0.0.0 {
     SDLNet_SimulateDatagramPacketLoss;
     SDLNet_SimulateStreamPacketLoss;
     SDLNet_UnrefAddress;
+    SDLNet_Version;
     SDLNet_WaitUntilConnected;
     SDLNet_WaitUntilInputAvailable;
     SDLNet_WaitUntilResolved;