Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@buildroot.org
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [Buildroot] [PATCH 1/1] package/gamin: fix build with gcc >= 14
Date: Tue, 23 Jul 2024 10:56:45 +0200	[thread overview]
Message-ID: <20240723085645.732060-1-fontaine.fabrice@gmail.com> (raw)

Fix the following build failure with gcc >= 14:

gam_api.c: In function 'gamin_get_user_name':
gam_api.c:123:9: error: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration]
  123 |         strncpy(user_name, pw->pw_name, 99);
      |         ^~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/b267f53ba6035d256c013dbbbbd1bcdfe0ef111f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../gamin/0004-fix-build-with-gcc-14.patch    | 104 ++++++++++++++++++
 1 file changed, 104 insertions(+)
 create mode 100644 package/gamin/0004-fix-build-with-gcc-14.patch

diff --git a/package/gamin/0004-fix-build-with-gcc-14.patch b/package/gamin/0004-fix-build-with-gcc-14.patch
new file mode 100644
index 0000000000..0380c6f120
--- /dev/null
+++ b/package/gamin/0004-fix-build-with-gcc-14.patch
@@ -0,0 +1,104 @@
+From 2e37707a94d20d6772862f18902a62b5ff666a27 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 23 Jul 2024 10:43:54 +0200
+Subject: [PATCH] fix build with gcc >= 14
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ libgamin/gam_api.c      | 1 +
+ server/gam_connection.c | 1 +
+ server/gam_eq.c         | 2 +-
+ server/gam_inotify.c    | 1 +
+ server/gam_listener.c   | 1 +
+ server/gam_node.c       | 1 +
+ server/gam_server.c     | 1 +
+ 7 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/libgamin/gam_api.c b/libgamin/gam_api.c
+index 4e87e63..64e0749 100644
+--- a/libgamin/gam_api.c
++++ b/libgamin/gam_api.c
+@@ -6,6 +6,7 @@
+ #include <pwd.h>
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+diff --git a/server/gam_connection.c b/server/gam_connection.c
+index 250b200..8300253 100644
+--- a/server/gam_connection.c
++++ b/server/gam_connection.c
+@@ -3,6 +3,7 @@
+ #include <stdlib.h>             /* for exit() */
+ #include <time.h>
+ #include "gam_connection.h"
++#include "gam_excludes.h"
+ #include "gam_subscription.h"
+ #include "gam_listener.h"
+ #include "gam_server.h"
+diff --git a/server/gam_eq.c b/server/gam_eq.c
+index 79d8f69..b8051c8 100644
+--- a/server/gam_eq.c
++++ b/server/gam_eq.c
+@@ -124,7 +124,7 @@ gam_eq_flush (gam_eq_t *eq, GamConnDataPtr conn)
+ {
+ 	gboolean done_work = FALSE;
+ 	if (!eq)
+-		return;
++		return done_work;
+ 
+ #ifdef GAM_EQ_VERBOSE
+ 	GAM_DEBUG(DEBUG_INFO, "gam_eq: Flushing event queue for %s\n", gam_connection_get_pidname (conn));
+diff --git a/server/gam_inotify.c b/server/gam_inotify.c
+index 35054d6..90a5841 100644
+--- a/server/gam_inotify.c
++++ b/server/gam_inotify.c
+@@ -27,6 +27,7 @@
+ #endif
+ #include "gam_error.h"
+ #include "gam_event.h"
++#include "gam_poll_basic.h"
+ #include "gam_server.h"
+ #include "gam_subscription.h"
+ #include "gam_inotify.h"
+diff --git a/server/gam_listener.c b/server/gam_listener.c
+index 9c41464..085ce2e 100644
+--- a/server/gam_listener.c
++++ b/server/gam_listener.c
+@@ -20,6 +20,7 @@
+ 
+ #include <string.h>
+ #include <glib.h>
++#include "gam_excludes.h"
+ #include "gam_listener.h"
+ #include "gam_subscription.h"
+ #include "gam_server.h"
+diff --git a/server/gam_node.c b/server/gam_node.c
+index d0302d2..ab99042 100644
+--- a/server/gam_node.c
++++ b/server/gam_node.c
+@@ -23,6 +23,7 @@
+ #include "gam_event.h"
+ #include "gam_node.h"
+ #include "gam_error.h"
++#include "gam_server.h"
+ 
+ /**
+  * Create a new node
+diff --git a/server/gam_server.c b/server/gam_server.c
+index f92a691..615eb5a 100644
+--- a/server/gam_server.c
++++ b/server/gam_server.c
+@@ -29,6 +29,7 @@
+ #include "gam_protocol.h"
+ #include "gam_event.h"
+ #include "gam_listener.h"
++#include "gam_poll_basic.h"
+ #include "gam_server.h"
+ #include "gam_channel.h"
+ #include "gam_subscription.h"
+-- 
+2.43.0
+
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2024-07-23  8:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23  8:56 Fabrice Fontaine [this message]
2024-07-23  9:41 ` [Buildroot] [PATCH 1/1] package/gamin: fix build with gcc >= 14 Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240723085645.732060-1-fontaine.fabrice@gmail.com \
    --to=fontaine.fabrice@gmail.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox