2014-04-21 14:20:58

by Natanael Copa

[permalink] [raw]
Subject: [PATCH] tools: fix headers for bcm43xx

PATH_MAX is defined in limits.h so includ it explicitly.

This fixes the following compile error on musl libc (Alpine Linux):
tools/hciattach_bcm43xx.c: In function 'bcm43xx_locate_patch':
tools/hciattach_bcm43xx.c:313:14: error: 'PATH_MAX' undeclared (first use in this function)
char path[PATH_MAX];
^

Signed-off-by: Natanael Copa <[email protected]>
---
tools/hciattach_bcm43xx.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index ad9b239..cb4bfb9 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -34,6 +34,7 @@
#include <errno.h>
#include <dirent.h>
#include <time.h>
+#include <limits.h>

#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
--
1.9.2



2014-04-21 18:20:25

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] tools: fix headers for bcm43xx

Hi Natanael,

> PATH_MAX is defined in limits.h so includ it explicitly.
>
> This fixes the following compile error on musl libc (Alpine Linux):
> tools/hciattach_bcm43xx.c: In function 'bcm43xx_locate_patch':
> tools/hciattach_bcm43xx.c:313:14: error: 'PATH_MAX' undeclared (first use in this function)
> char path[PATH_MAX];
> ^
>
> Signed-off-by: Natanael Copa <[email protected]>

our userspace code is not using Signed-off-by.

Regards

Marcel


2014-08-20 10:41:28

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH v2] tools: fix headers for bcm43xx

Hi Natanael,

On Wed, Aug 20, 2014 at 12:06 PM, Natanael Copa <[email protected]> wrote:
> PATH_MAX is defined in limits.h so include it explicitly.
>
> This fixes the following compile error on musl libc (Alpine Linux):
> tools/hciattach_bcm43xx.c: In function 'bcm43xx_locate_patch':
> tools/hciattach_bcm43xx.c:313:14: error: 'PATH_MAX' undeclared (first use in this function)
> char path[PATH_MAX];
> ^
> ---
> This is a delayed follow-up of:
> http://comments.gmane.org/gmane.linux.bluez.kernel/47523
>
> Changes since v1:
> - remove signed-off-by line
> - fix typo in commit message
>
> tools/hciattach_bcm43xx.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
> index ad9b239..cb4bfb9 100644
> --- a/tools/hciattach_bcm43xx.c
> +++ b/tools/hciattach_bcm43xx.c
> @@ -34,6 +34,7 @@
> #include <errno.h>
> #include <dirent.h>
> #include <time.h>
> +#include <limits.h>
>
> #include <bluetooth/bluetooth.h>
> #include <bluetooth/hci.h>
> --
> 2.1.0

Applied, thanks.


--
Luiz Augusto von Dentz

2014-08-20 09:06:21

by Natanael Copa

[permalink] [raw]
Subject: [PATCH v2] tools: fix headers for bcm43xx

PATH_MAX is defined in limits.h so include it explicitly.

This fixes the following compile error on musl libc (Alpine Linux):
tools/hciattach_bcm43xx.c: In function 'bcm43xx_locate_patch':
tools/hciattach_bcm43xx.c:313:14: error: 'PATH_MAX' undeclared (first use in this function)
char path[PATH_MAX];
^
---
This is a delayed follow-up of:
http://comments.gmane.org/gmane.linux.bluez.kernel/47523

Changes since v1:
- remove signed-off-by line
- fix typo in commit message

tools/hciattach_bcm43xx.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index ad9b239..cb4bfb9 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -34,6 +34,7 @@
#include <errno.h>
#include <dirent.h>
#include <time.h>
+#include <limits.h>

#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
--
2.1.0