Menu

#145 Does not compile with GCC 14 within the OpenWrt build environment

None
closed-fixed
Jan Kara
None
5
2026-05-25
2025-05-31
No

Quota does not compile with GCC 14 within the OpenWrt build environment. The problem appears to be a missing #include. This patch fixes the problem:

Here is the error:

setproject.c: In function 'main':
setproject.c:144:20: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
  144 |         progname = basename(argv[0]);
      |                    ^~~~~~~~
setproject.c:144:18: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  144 |         progname = basename(argv[0]);
      |

This patch fixes the problem:

diff -u --recursive quota-4.10-vanilla/common.h quota-4.10/common.h
--- quota-4.10-vanilla/common.h 2024-07-25 12:36:44.000000000 -0500
+++ quota-4.10/common.h 2025-05-31 07:27:50.828544411 -0500
@@ -7,6 +7,7 @@
 #ifndef GUARD_COMMON_H
 #define GUARD_COMMON_H

+#include <libgen.h>
 #include <time.h>
 #include <stdarg.h> 

Discussion

  • Jan Kara

    Jan Kara - 2025-07-01

    Thanks! I've fixed this in setproject.c directly. If you give me your email address, I can properly credit you in the changelog :).

     
  • Jan Kara

    Jan Kara - 2026-05-25
    • status: open --> closed-fixed
    • Group: -->
     

Anonymous
Anonymous

Add attachments
Cancel