Skip to contentSkip to conversation

libtirpc: fix bindresvport build with clang-22/C23

PATCH New Khem Raj 1 participant 1 message Apr 1

Subsystems (2)
lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 libtirpc: fix bindresvport build with clang-22/C23

bindresvport() is defined using old K&R-style syntax, which breaks when building libtirpc with clang-22 in gnu23 mode.

Convert it to a prototype-style definition. This is a no-op change intended only to restore compatibility with modern C compilers.

---
 src/bindresvport.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
src/bindresvport.c +1 -3
index 7b2056d..eea6589 100644
@@ -57,9 +57,7 @@ extern pthread_mutex_t port_lock;
  * Bind a socket to a privileged IP port
  */
 int
-bindresvport(sd, sin)
-        int sd;
-        struct sockaddr_in *sin;
+bindresvport(int sd, struct sockaddr_in *sin)
 {
         return bindresvport_sa(sd, (struct sockaddr *)sin);
 }