Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 888467

Summary: net-wireless/bluez-5.66 - src/shared/util.c: In function 'util_debug_va': src/shared/util.c:68:18: error: 'MAX_INPUT' undeclared (first use in this function)
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: Current packagesAssignee: Pacho Ramos <pacho>
Status: RESOLVED FIXED    
Severity: normal CC: 464270342, sam, toralf
Priority: Normal Keywords: PATCH, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/29209
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: build.log
emerge --info
musl.patch

Description ernsteiswuerfel archtester 2022-12-25 22:35:30 UTC
Created attachment 844905 [details]
build.log

[...]
libtool: compile:  x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I./lib -fPIC -Os -march=bdver2 -mtune=bdver2 -pipe -c src/shared/crypto.c  -fPIC -DPIC -o src/shared/.libs/libshared_mainloop_la-crypto.o
src/shared/util.c: In function 'util_debug_va':
src/shared/util.c:68:18: error: 'MAX_INPUT' undeclared (first use in this function)
   68 |         char str[MAX_INPUT];
      |                  ^~~~~~~~~
src/shared/util.c:68:18: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:8102: src/shared/libshared_mainloop_la-util.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4468: all] Error 2
 * ERROR: net-wireless/bluez-5.66::gentoo failed (compile phase):
Comment 1 ernsteiswuerfel archtester 2022-12-25 22:37:25 UTC
Created attachment 844906 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2022-12-26 10:42:40 UTC
Created attachment 844927 [details, diff]
musl.patch

Borrowed from https://github.com/nilfs-dev/nilfs-utils/commit/115fe4b976858c487cf83065f513d8626089579a

Builds fine with the patch.
Comment 3 Pacho Ramos gentoo-dev 2023-01-22 11:58:21 UTC
Can you please forward it to upstream too?

Thanks

After that, feel free to go ahead and commit I didn't before :)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-31 05:43:42 UTC
*** Bug 892688 has been marked as a duplicate of this bug. ***
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-31 05:43:57 UTC
*** Bug 889270 has been marked as a duplicate of this bug. ***
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-31 05:54:28 UTC
(In reply to Pacho Ramos from comment #3)
> Can you please forward it to upstream too?
> 
> Thanks
> 
> After that, feel free to go ahead and commit I didn't before :)

Sent as https://lore.kernel.org/linux-bluetooth/20230131055258.3311810-1-sam@gentoo.org/T/#u.
Comment 7 Larry the Git Cow gentoo-dev 2023-01-31 05:56:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a5a1d52e9a5ebdd5e8011ea933765bda0c838b6

commit 4a5a1d52e9a5ebdd5e8011ea933765bda0c838b6
Author:     brahmajit das <listout@protonmail.com>
AuthorDate: 2023-01-21 16:35:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-31 05:55:20 +0000

    net-wireless/bluez: fix 'MAX_INPUT' undeclared in musl
    
    musl does provide _POSIX_MAX_INPUT, but no MAX_INPUT out of the box.
    This commit assigns _POSIX_MAX_INPUT to MAX_INPUT.
    
    Closes: https://bugs.gentoo.org/888467
    Signed-off-by: brahmajit das <listout@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/29209
    Signed-off-by: Sam James <sam@gentoo.org>

 net-wireless/bluez/bluez-5.66-r1.ebuild               |  4 ++++
 .../bluez/files/bluez-5.66-musl-max-input.patch       | 19 +++++++++++++++++++
 2 files changed, 23 insertions(+)
Comment 9 ernsteiswuerfel archtester 2023-02-02 17:19:10 UTC
(In reply to Sam James from comment #8)
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/
> ?id=ca6546fe521360fcf905bc115b893f322e706cb2
Thanks for getting it upstream!
Comment 10 Pacho Ramos gentoo-dev 2023-02-05 12:09:34 UTC
Thanks Sam!

I have plenty of work these last weeks :S