linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ] lib: Fix includes in installed header files
@ 2025-08-25 15:46 Arkadiusz Bokowy
  2025-08-25 16:40 ` Bastien Nocera
  2025-08-25 17:07 ` [BlueZ] lib: Fix includes in installed header files bluez.test.bot
  0 siblings, 2 replies; 8+ messages in thread
From: Arkadiusz Bokowy @ 2025-08-25 15:46 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Arkadiusz Bokowy

Every public header file should be self-contained in terms of used
symbols. To satisfy that, hci.h and hci_lib.h need to pull their
direct dependencies, so users will not have to include bluetooth.h
before using for example hci_lib.h.
---
 lib/bluetooth/hci.h     | 3 +++
 lib/bluetooth/hci_lib.h | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/lib/bluetooth/hci.h b/lib/bluetooth/hci.h
index 8f59a535a..732477ec4 100644
--- a/lib/bluetooth/hci.h
+++ b/lib/bluetooth/hci.h
@@ -17,8 +17,11 @@
 extern "C" {
 #endif
 
+#include <stdint.h>
 #include <sys/socket.h>
 
+#include <bluetooth/bluetooth.h>
+
 #define HCI_MAX_DEV	16
 
 #define HCI_MAX_AMP_SIZE	(1492 + 4)
diff --git a/lib/bluetooth/hci_lib.h b/lib/bluetooth/hci_lib.h
index 2cb660786..eeb51411a 100644
--- a/lib/bluetooth/hci_lib.h
+++ b/lib/bluetooth/hci_lib.h
@@ -17,6 +17,12 @@
 extern "C" {
 #endif
 
+#include <stdint.h>
+#include <string.h>
+
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/hci.h>
+
 struct hci_request {
 	uint16_t ogf;
 	uint16_t ocf;
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH BlueZ] lib: Fix includes in installed header files
  2025-08-25 15:46 [PATCH BlueZ] lib: Fix includes in installed header files Arkadiusz Bokowy
@ 2025-08-25 16:40 ` Bastien Nocera
  2025-08-25 18:31   ` [PATCH BlueZ v2 1/2] lib: Add missing includes in bluetooth/hci.h Arkadiusz Bokowy
  2025-08-25 17:07 ` [BlueZ] lib: Fix includes in installed header files bluez.test.bot
  1 sibling, 1 reply; 8+ messages in thread
From: Bastien Nocera @ 2025-08-25 16:40 UTC (permalink / raw)
  To: Arkadiusz Bokowy, linux-bluetooth

On Mon, 2025-08-25 at 17:46 +0200, Arkadiusz Bokowy wrote:
> Every public header file should be self-contained in terms of used
> symbols. To satisfy that, hci.h and hci_lib.h need to pull their
> direct dependencies, so users will not have to include bluetooth.h
> before using for example hci_lib.h.

I think it might have been useful if those 2 changes were single
commits, and you showed the compile errors you got so the fix is clear.

> ---
>  lib/bluetooth/hci.h     | 3 +++
>  lib/bluetooth/hci_lib.h | 6 ++++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/lib/bluetooth/hci.h b/lib/bluetooth/hci.h
> index 8f59a535a..732477ec4 100644
> --- a/lib/bluetooth/hci.h
> +++ b/lib/bluetooth/hci.h
> @@ -17,8 +17,11 @@
>  extern "C" {
>  #endif
>  
> +#include <stdint.h>
>  #include <sys/socket.h>
>  
> +#include <bluetooth/bluetooth.h>
> +
>  #define HCI_MAX_DEV	16
>  
>  #define HCI_MAX_AMP_SIZE	(1492 + 4)
> diff --git a/lib/bluetooth/hci_lib.h b/lib/bluetooth/hci_lib.h
> index 2cb660786..eeb51411a 100644
> --- a/lib/bluetooth/hci_lib.h
> +++ b/lib/bluetooth/hci_lib.h
> @@ -17,6 +17,12 @@
>  extern "C" {
>  #endif
>  
> +#include <stdint.h>
> +#include <string.h>
> +
> +#include <bluetooth/bluetooth.h>
> +#include <bluetooth/hci.h>
> +
>  struct hci_request {
>  	uint16_t ogf;
>  	uint16_t ocf;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [BlueZ] lib: Fix includes in installed header files
  2025-08-25 15:46 [PATCH BlueZ] lib: Fix includes in installed header files Arkadiusz Bokowy
  2025-08-25 16:40 ` Bastien Nocera
@ 2025-08-25 17:07 ` bluez.test.bot
  1 sibling, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2025-08-25 17:07 UTC (permalink / raw)
  To: linux-bluetooth, arkadiusz.bokowy

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=995294

---Test result---

Test Summary:
CheckPatch                    PENDING   0.23 seconds
GitLint                       PENDING   0.31 seconds
BuildEll                      PASS      20.33 seconds
BluezMake                     PASS      2672.70 seconds
MakeCheck                     PASS      20.59 seconds
MakeDistcheck                 PASS      187.71 seconds
CheckValgrind                 PASS      238.14 seconds
CheckSmatch                   PASS      306.34 seconds
bluezmakeextell               PASS      128.14 seconds
IncrementalBuild              PENDING   0.35 seconds
ScanBuild                     PASS      922.38 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH BlueZ v2 1/2] lib: Add missing includes in bluetooth/hci.h
  2025-08-25 16:40 ` Bastien Nocera
@ 2025-08-25 18:31   ` Arkadiusz Bokowy
  2025-08-25 18:31     ` [PATCH BlueZ v2 2/2] lib: Add missing includes in bluetooth/hci_lib.h Arkadiusz Bokowy
                       ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Arkadiusz Bokowy @ 2025-08-25 18:31 UTC (permalink / raw)
  To: hadess; +Cc: linux-bluetooth, Arkadiusz Bokowy

Compilation fails when using bluetooth/hci.h without other includes.

> /usr/include/bluetooth/hci.h:310:9: error: unknown type name ‘uint8_t’
>   310 |         uint8_t         lap[3];
>       |         ^~~~~~~
> ...
> /usr/include/bluetooth/hci.h:383:9: error: unknown type name ‘bdaddr_t’; did you mean ‘daddr_t’?
>   383 |         bdaddr_t        bdaddr;
>       |         ^~~~~~~~
> ...
---
 lib/bluetooth/hci.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/bluetooth/hci.h b/lib/bluetooth/hci.h
index 8f59a535a..732477ec4 100644
--- a/lib/bluetooth/hci.h
+++ b/lib/bluetooth/hci.h
@@ -17,8 +17,11 @@
 extern "C" {
 #endif
 
+#include <stdint.h>
 #include <sys/socket.h>
 
+#include <bluetooth/bluetooth.h>
+
 #define HCI_MAX_DEV	16
 
 #define HCI_MAX_AMP_SIZE	(1492 + 4)
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH BlueZ v2 2/2] lib: Add missing includes in bluetooth/hci_lib.h
  2025-08-25 18:31   ` [PATCH BlueZ v2 1/2] lib: Add missing includes in bluetooth/hci.h Arkadiusz Bokowy
@ 2025-08-25 18:31     ` Arkadiusz Bokowy
  2025-08-25 19:57     ` [BlueZ,v2,1/2] lib: Add missing includes in bluetooth/hci.h bluez.test.bot
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Arkadiusz Bokowy @ 2025-08-25 18:31 UTC (permalink / raw)
  To: hadess; +Cc: linux-bluetooth, Arkadiusz Bokowy

Compilation fails when using bluetooth/hci_lib.h without other includes.

> /usr/include/bluetooth/hci_lib.h:21:9: error: unknown type name ‘uint16_t’
>    21 |         uint16_t ogf;
>       |         ^~~~~~~~
> ...
> /usr/include/bluetooth/hci_lib.h:182:27: error: ‘HCI_VENDOR_PKT’ undeclared
>   182 |         hci_set_bit((t == HCI_VENDOR_PKT) ? 0 : (t & HCI_FLT_TYPE_BITS), &f->type_mask);
>       |                           ^~~~~~~~~~~~~~
---
 lib/bluetooth/hci_lib.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/bluetooth/hci_lib.h b/lib/bluetooth/hci_lib.h
index 2cb660786..eeb51411a 100644
--- a/lib/bluetooth/hci_lib.h
+++ b/lib/bluetooth/hci_lib.h
@@ -17,6 +17,12 @@
 extern "C" {
 #endif
 
+#include <stdint.h>
+#include <string.h>
+
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/hci.h>
+
 struct hci_request {
 	uint16_t ogf;
 	uint16_t ocf;
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [BlueZ,v2,1/2] lib: Add missing includes in bluetooth/hci.h
  2025-08-25 18:31   ` [PATCH BlueZ v2 1/2] lib: Add missing includes in bluetooth/hci.h Arkadiusz Bokowy
  2025-08-25 18:31     ` [PATCH BlueZ v2 2/2] lib: Add missing includes in bluetooth/hci_lib.h Arkadiusz Bokowy
@ 2025-08-25 19:57     ` bluez.test.bot
  2025-08-25 20:20     ` [PATCH BlueZ v2 1/2] " patchwork-bot+bluetooth
  2025-08-26  8:13     ` Bastien Nocera
  3 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2025-08-25 19:57 UTC (permalink / raw)
  To: linux-bluetooth, arkadiusz.bokowy

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=995364

---Test result---

Test Summary:
CheckPatch                    PENDING   0.34 seconds
GitLint                       PENDING   0.22 seconds
BuildEll                      PASS      20.05 seconds
BluezMake                     PASS      2587.60 seconds
MakeCheck                     PASS      19.93 seconds
MakeDistcheck                 PASS      183.20 seconds
CheckValgrind                 PASS      234.35 seconds
CheckSmatch                   PASS      306.05 seconds
bluezmakeextell               PASS      128.11 seconds
IncrementalBuild              PENDING   0.31 seconds
ScanBuild                     PASS      901.26 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH BlueZ v2 1/2] lib: Add missing includes in bluetooth/hci.h
  2025-08-25 18:31   ` [PATCH BlueZ v2 1/2] lib: Add missing includes in bluetooth/hci.h Arkadiusz Bokowy
  2025-08-25 18:31     ` [PATCH BlueZ v2 2/2] lib: Add missing includes in bluetooth/hci_lib.h Arkadiusz Bokowy
  2025-08-25 19:57     ` [BlueZ,v2,1/2] lib: Add missing includes in bluetooth/hci.h bluez.test.bot
@ 2025-08-25 20:20     ` patchwork-bot+bluetooth
  2025-08-26  8:13     ` Bastien Nocera
  3 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+bluetooth @ 2025-08-25 20:20 UTC (permalink / raw)
  To: Arkadiusz Bokowy; +Cc: hadess, linux-bluetooth

Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon, 25 Aug 2025 20:31:58 +0200 you wrote:
> Compilation fails when using bluetooth/hci.h without other includes.
> 
> > /usr/include/bluetooth/hci.h:310:9: error: unknown type name ‘uint8_t’
> >   310 |         uint8_t         lap[3];
> >       |         ^~~~~~~
> > ...
> > /usr/include/bluetooth/hci.h:383:9: error: unknown type name ‘bdaddr_t’; did you mean ‘daddr_t’?
> >   383 |         bdaddr_t        bdaddr;
> >       |         ^~~~~~~~
> > ...
> 
> [...]

Here is the summary with links:
  - [BlueZ,v2,1/2] lib: Add missing includes in bluetooth/hci.h
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=61c49dfa2e8d
  - [BlueZ,v2,2/2] lib: Add missing includes in bluetooth/hci_lib.h
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f911b6df4fd1

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH BlueZ v2 1/2] lib: Add missing includes in bluetooth/hci.h
  2025-08-25 18:31   ` [PATCH BlueZ v2 1/2] lib: Add missing includes in bluetooth/hci.h Arkadiusz Bokowy
                       ` (2 preceding siblings ...)
  2025-08-25 20:20     ` [PATCH BlueZ v2 1/2] " patchwork-bot+bluetooth
@ 2025-08-26  8:13     ` Bastien Nocera
  3 siblings, 0 replies; 8+ messages in thread
From: Bastien Nocera @ 2025-08-26  8:13 UTC (permalink / raw)
  To: Arkadiusz Bokowy; +Cc: linux-bluetooth

Both patches look good, thanks!

On Mon, 2025-08-25 at 20:31 +0200, Arkadiusz Bokowy wrote:
> Compilation fails when using bluetooth/hci.h without other includes.
> 
> > /usr/include/bluetooth/hci.h:310:9: error: unknown type name
> > ‘uint8_t’
> >   310 |         uint8_t         lap[3];
> >       |         ^~~~~~~
> > ...
> > /usr/include/bluetooth/hci.h:383:9: error: unknown type name
> > ‘bdaddr_t’; did you mean ‘daddr_t’?
> >   383 |         bdaddr_t        bdaddr;
> >       |         ^~~~~~~~
> > ...
> ---
>  lib/bluetooth/hci.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/bluetooth/hci.h b/lib/bluetooth/hci.h
> index 8f59a535a..732477ec4 100644
> --- a/lib/bluetooth/hci.h
> +++ b/lib/bluetooth/hci.h
> @@ -17,8 +17,11 @@
>  extern "C" {
>  #endif
>  
> +#include <stdint.h>
>  #include <sys/socket.h>
>  
> +#include <bluetooth/bluetooth.h>
> +
>  #define HCI_MAX_DEV	16
>  
>  #define HCI_MAX_AMP_SIZE	(1492 + 4)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-08-26  8:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25 15:46 [PATCH BlueZ] lib: Fix includes in installed header files Arkadiusz Bokowy
2025-08-25 16:40 ` Bastien Nocera
2025-08-25 18:31   ` [PATCH BlueZ v2 1/2] lib: Add missing includes in bluetooth/hci.h Arkadiusz Bokowy
2025-08-25 18:31     ` [PATCH BlueZ v2 2/2] lib: Add missing includes in bluetooth/hci_lib.h Arkadiusz Bokowy
2025-08-25 19:57     ` [BlueZ,v2,1/2] lib: Add missing includes in bluetooth/hci.h bluez.test.bot
2025-08-25 20:20     ` [PATCH BlueZ v2 1/2] " patchwork-bot+bluetooth
2025-08-26  8:13     ` Bastien Nocera
2025-08-25 17:07 ` [BlueZ] lib: Fix includes in installed header files bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).