~registry/kmod/master

  • Committer: Lucas De Marchi
  • Author(s): Khem Raj
  • Date: 2024-06-10 23:15:39 UTC
  • Revision ID: git-v1:11eb9bc67c319900ab00523997323a97d2d08ad2
Use portable implementation for basename API

musl has removed the non-prototype declaration of basename from
string.h [1] which now results in build errors with clang-17+ compiler

Implement GNU basename behavior using strchr which is portable across libcs

Fixes
../git/tools/kmod.c:71:19: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
71 | "Commands:\n", basename(argv[0]));
| ^

[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7

Suggested-by: Rich Felker

Signed-off-by: Khem Raj <raj.khem@gmail.com>
[ Implement a basename() function in missing.h and ensure we always use
  the right include rather than having a separate gnu_basename() ]
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Filename Latest Rev Last Changed Committer Comment Size
..
libkmod 2 12 years ago Lucas De Marchi Rename libabc to libkmod Diff
m4 1 12 years ago Lucas De Marchi Import skeleton from libabc Diff
man 439 12 years ago Lucas De Marchi rename doc dir to man Diff
shared 919 10 years ago Lucas De Marchi Move macro.h to shared directory It's not really Diff
shell-completion 815 11 years ago Lucas De Marchi shell-completion: Add initial completion for kmod Diff
testsuite 495 12 years ago Lucas De Marchi testsuite: add skeleton Diff
tools 163 12 years ago Lucas De Marchi Merge branch 'use-mmap' Conflicts: libkmod/libkm Diff
.gitignore 1328 5 months ago Lucas De Marchi build: Ignore directories commonly used for out-of 324 bytes Diff Download File
File autogen.sh 1316 8 months ago Lucas De Marchi Drop python bindings Python bindings are not well 1.7 KB Diff Download File
CODING-STYLE 971 9 years ago Lucas De Marchi CODING-STYLE: add include order 2.3 KB Diff Download File
configure.ac 1342 4 months ago Lucas De Marchi Use portable implementation for basename API musl 11.4 KB Diff Download File
COPYING 928 10 years ago Lucas De Marchi Clarify what licences apply where This doesn't ch 25.8 KB Diff Download File
Makefile.am 1326 7 months ago Lucas De Marchi Install kmod.pc in ${datadir}/pkgconfig The data 13.5 KB Diff Download File
NEWS 1324 7 months ago Lucas De Marchi kmod 32 31.4 KB Diff Download File
README.md 1316 8 months ago Lucas De Marchi Drop python bindings Python bindings are not well 3.6 KB Diff Download File
TODO 1142 6 years ago Lucas De Marchi libkmod-module: check for NULL before accessing po 2.1 KB Diff Download File