git: 3501e2597e9e - stable/15 - sdp(3): Change bdaddr parameter type in sdp_register_service()

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Thu, 18 Sep 2025 09:58:15 UTC
The branch stable/15 has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=3501e2597e9e241b57832941912452c48df05e56

commit 3501e2597e9e241b57832941912452c48df05e56
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-09-17 14:12:03 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-09-18 09:57:22 +0000

    sdp(3): Change bdaddr parameter type in sdp_register_service()
    
    Fixes compiler error when the caller passes a const bdaddr_t *
    paramemeter (e.g., NG_HCI_BDADDR_ANY).
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 day
    Reviewed by:    markj, emaste
    Differential Revision:  https://reviews.freebsd.org/D52582
    
    (cherry picked from commit 3d14cc82d7a8c11cd164a6ba668d20b939c576fe)
---
 lib/libsdp/sdp.3     | 4 ++--
 lib/libsdp/sdp.h     | 2 +-
 lib/libsdp/service.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/libsdp/sdp.3 b/lib/libsdp/sdp.3
index dcd9077798ea..015f9cd8fb44 100644
--- a/lib/libsdp/sdp.3
+++ b/lib/libsdp/sdp.3
@@ -24,7 +24,7 @@
 .\"
 .\" $Id: sdp.3,v 1.1 2003/09/07 20:34:19 max Exp $
 .\"
-.Dd April 30, 2018
+.Dd September 16, 2025
 .Dt SDP 3
 .Os
 .Sh NAME
@@ -87,7 +87,7 @@
 .Fn sdp_uuid2desc "uint16_t uuid"
 .Ft int32_t
 .Fo sdp_register_service
-.Fa "void *xss" "uint16_t uuid" "bdaddr_p const bdaddr" "uint8_t const *data"
+.Fa "void *xss" "uint16_t uuid" "const bdaddr_t *bdaddr" "uint8_t const *data"
 .Fa "uint32_t datalen" "uint32_t *handle"
 .Fc
 .Ft int32_t
diff --git a/lib/libsdp/sdp.h b/lib/libsdp/sdp.h
index faad36aefca6..0c9474a70eff 100644
--- a/lib/libsdp/sdp.h
+++ b/lib/libsdp/sdp.h
@@ -702,7 +702,7 @@ typedef struct sdp_panu_profile		sdp_panu_profile_t;
 typedef struct sdp_panu_profile *	sdp_panu_profile_p;
 
 int32_t	sdp_register_service	(void *xss, uint16_t uuid,
-				 bdaddr_p const bdaddr, uint8_t const *data,
+				 const bdaddr_t *bdaddr, uint8_t const *data,
 				 uint32_t datalen, uint32_t *handle);
 int32_t	sdp_unregister_service	(void *xss, uint32_t handle);
 int32_t	sdp_change_service	(void *xss, uint32_t handle,
diff --git a/lib/libsdp/service.c b/lib/libsdp/service.c
index 9f07d1ba86ba..2cce6c133600 100644
--- a/lib/libsdp/service.c
+++ b/lib/libsdp/service.c
@@ -45,7 +45,7 @@
 static int32_t sdp_receive_error_pdu(sdp_session_p ss);
 
 int32_t
-sdp_register_service(void *xss, uint16_t uuid, bdaddr_p const bdaddr,
+sdp_register_service(void *xss, uint16_t uuid, const bdaddr_t *bdaddr,
 		uint8_t const *data, uint32_t datalen, uint32_t *handle)
 {
 	sdp_session_p	ss = (sdp_session_p) xss;