]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
fix handling of missing const type qualifier 2143/head 2146/head
authorRudi Heitbaum <rudi@heitbaum.com>
Sat, 14 Feb 2026 04:12:07 +0000 (15:12 +1100)
committerGitHub <noreply@github.com>
Sat, 14 Feb 2026 04:12:07 +0000 (15:12 +1100)
For ISO C23, the function strrchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type.

Update to const type for variable, as returned string is only used in comparisons which const can be used

mdns_avahi.c

index 29c360f6253976a5c43c68ad84ba29f671d2030f..cf45ba235a88c0bbb76a2fdf18469b9af8fee714 100644 (file)
@@ -109,7 +109,7 @@ static void resolve_callback(AvahiServiceResolver *r, AVAHI_GCC_UNUSED AvahiIfIn
     //    char a[AVAHI_ADDRESS_STR_MAX], *t;
     debug(3, "resolve_callback: Service '%s' of type '%s' in domain '%s':", name, type, domain);
     if (dbs->dacp_id) {
-      char *dacpid = strstr(name, "iTunes_Ctrl_");
+      const char *dacpid = strstr(name, "iTunes_Ctrl_");
       if (dacpid) {
         dacpid += strlen("iTunes_Ctrl_");
         while (*dacpid == '0')