Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931887 - app-admin/testdisk-7.2 - hdaccess.c:1016:7: error: call to undeclared function 'basename'
Summary: app-admin/testdisk-7.2 - hdaccess.c:1016:7: error: call to undeclared functio...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL: https://github.com/cgsecurity/testdis...
Whiteboard:
Keywords:
Depends on:
Blocks: musl-1.2.5
  Show dependency tree
 
Reported: 2024-05-13 21:15 UTC by ernsteiswuerfel
Modified: 2024-05-14 17:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (testdisk-7.2:20240513-205000.log,29.66 KB, text/plain)
2024-05-13 21:15 UTC, ernsteiswuerfel
Details
emerge --info (file_931887.txt,7.65 KB, text/plain)
2024-05-13 21:15 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2024-05-13 21:15:08 UTC
Created attachment 892894 [details]
build.log

[...]
clang -DHAVE_CONFIG_H -I. -I..     -Os -march=x86-64-v2 -pipe -Wdeclaration-after-statement -Wall -Wextra -MD -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wwrite-strings -W -Wcast-align -Waggregate-return -Wbad-function-cast -Wcast-qual -Wundef -Wredundant-decls -Wsign-compare -Wnested-externs -Winline -Wdisabled-optimization -Wfloat-equal -Wmissing-format-attribute -Wmultichar -Wc++-compat -Wformat=2 -Wtrampolines -Wunreachable-code -Wvla -fstack-protector-strong  -c -o hdaccess.o hdaccess.c
warning: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]
In file included from hdaccess.c:60:
./common.h:42:19: warning: unknown attribute 'gcc_struct' ignored
      [-Wunknown-attributes]
   42 | } __attribute__ ((gcc_struct, __packed__));
      |                   ^~~~~~~~~~
hdaccess.c:163:19: warning: unknown attribute 'gcc_struct' ignored
      [-Wunknown-attributes]
  163 | } __attribute__ ((gcc_struct, __packed__));
      |                   ^~~~~~~~~~
hdaccess.c:1016:7: error: call to undeclared function 'basename'; ISO C99
      and later do not support implicit function declarations [-Wimplicit-function-declaration]
 1016 |       basename (disk_car->device), file);
      |       ^
hdaccess.c:1016:7: warning: format specifies type 'char *' but the argument
      has type 'int' [-Wformat]
 1015 |   snprintf (name_buf, 127, "/sys/block/%s/device/%s",
      |                                        ~~
      |                                        %d
 1016 |       basename (disk_car->device), file);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
hdaccess.c:1068:18: warning: unknown attribute 'gcc_struct' ignored
      [-Wunknown-attributes]
 1068 | } __attribute__((gcc_struct,__packed__)) scsi_inquiry_data_t;
      |                  ^~~~~~~~~~
hdaccess.c:1137:76: warning: unused parameter 'verbose'
      [-Wunused-parameter]
 1137 | static void disk_get_model(const int hd_h, disk_t *dev, const unsigned int verbose)
      |                                                                            ^
hdaccess.c:1616:56: warning: unused parameter 'buf' [-Wunused-parameter]
 1616 | static int file_nopwrite(disk_t *disk_car, const void *buf, const unsigned int count, co...
      |                                                        ^
7 warnings and 1 error generated.
make[2]: *** [Makefile:2238: hdaccess.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-admin/testdisk-7.2/work/testdisk-7.2/src'
make[1]: *** [Makefile:450: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-admin/testdisk-7.2/work/testdisk-7.2'
make: *** [Makefile:389: all] Error 2
 * ERROR: app-admin/testdisk-7.2::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2024-05-13 21:15:50 UTC
Created attachment 892895 [details]
emerge --info
Comment 3 Larry the Git Cow gentoo-dev 2024-05-14 17:18:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80b4f200f02a30f1f1e43e929deda4f525462bed

commit 80b4f200f02a30f1f1e43e929deda4f525462bed
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-05-14 17:17:30 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-05-14 17:17:30 +0000

    app-admin/testdisk: Backport a musl build fix
    
    Closes: https://bugs.gentoo.org/931887
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 app-admin/testdisk/files/testdisk-7.2-musl.patch | 25 ++++++++++++++++++++++++
 app-admin/testdisk/testdisk-7.2.ebuild           |  2 ++
 2 files changed, 27 insertions(+)