Thomas Perale 4f1ca35058 package/libapparmor: fix build w/ musl
When building the libapparmor package with musl the following error
would appear:

```
test_multi.c: In function 'main':
test_multi.c:27:30: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
   27 |         printf("File: %s\n", basename(argv[1]));
      |                              ^~~~~~~~
test_multi.c:27:24: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat=]
   27 |         printf("File: %s\n", basename(argv[1]));
      |                       ~^     ~~~~~~~~~~~~~~~~~
      |                        |     |
      |                        |     int
      |                        char *
      |                       %d
make[3]: *** [Makefile:466: test_multi_multi-test_multi.o] Error 1
```

This error can be reproduced with the following:

```
cat >.config <<EOF
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_MUSL_BLEEDING_EDGE=y
BR2_PACKAGE_LIBAPPARMOR=y
EOF
make olddefconfig
make libapparmor
```

On musl libc the function `basename` is provided by included libgen.h.
This error has been addressed upstream in [1] by re-defining the
function `basename`.

[1] 7fb040bde6

Signed-off-by: Thomas Perale <thomas.perale@mind.be>
[Peter: drop unrelated AUTORECONF change]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 2640f5dcd0)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-08-14 09:26:23 +02:00
2025-02-05 11:43:43 +01:00
2025-07-10 11:23:55 +02:00
2025-08-10 15:46:40 +02:00
2024-09-14 11:20:06 +02:00
2025-01-15 21:30:31 +01:00
2025-08-11 16:25:32 +02:00
2025-08-11 16:25:40 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches
Description
No description provided
Readme 183 MiB
Languages
Makefile 62.6%
Python 18.8%
C 8.5%
Shell 6.1%
PHP 1.4%
Other 2.2%