Re: [PATCH BlueZ] lib: Fix includes in installed header files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux