Skip to contentSkip to conversation

package/libedit: fix compile error

PATCH In review Waldemar Brodkorb 2 participants 3 messages Aug 12, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libedit: fix compile error

Header file uses ssize_t so sys/types.h must be included.

Fixes:
- http://autobuild.buildroot.net/results/439/439538b23776a58ff81c38754a19ee92c3590a1f

---
Author was informed via email about the issue.

---
 package/libedit/0002-add-sys-types_h.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 package/libedit/0002-add-sys-types_h.patch
package/libedit/0002-add-sys-types_h.patch new file +15 -0
new file mode 100644
index 0000000000..26aa906ee3
@@ -0,0 +1,15 @@
+Signed-off-by: Waldemar Brodkorb <[email protected]>
+Upstream: N/A only reachable via mail
+
+diff -Nur libedit-20221030-3.1.orig/src/sys.h libedit-20221030-3.1/src/sys.h
+--- libedit-20221030-3.1.orig/src/sys.h	2022-10-30 06:35:40.000000000 +0100
++++ libedit-20221030-3.1/src/sys.h	2023-08-12 09:52:28.137223311 +0200
+@@ -40,7 +40,7 @@
+ #ifndef _h_sys
+ #define	_h_sys
+ 
+-#if defined(HAVE_SYS_TYPES_H) && defined(__sun)
++#if defined(HAVE_SYS_TYPES_H)
+ #include <sys/types.h>
+ #endif
+ 
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Waldemar,

Quoted 5 lines · On Sat, 12 Aug 2023 10:21:34 +0200 Waldemar Brodkorb <[email protected]> wrote:

Header file uses ssize_t so sys/types.h must be included.

Fixes:
- http://autobuild.buildroot.net/results/439/439538b23776a58ff81c38754a19ee92c3590a1f

Quoted 7 lines

---
Author was informed via email about the issue.

---
 package/libedit/0002-add-sys-types_h.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 package/libedit/0002-add-sys-types_h.patch

I have applied to master, but after significantly improving the commit log. For all the "fixes" that you send, there is almost always a critical information that is missing: since when is the problem occurring. Indeed, we want to know if the fix needs to be backported to one of our stable branches or not.

So here, I had to do that research myself, to realize it's the version bump in commit cc69dbf8fdef6619c4ea09a4aaa97cd5ad3ee423 that introduced the regression. Since this commit is no yet in any release (other than 2023.08-rc1), there is no need to backport your fix to a previous stable Buildroot branch. This is really a critical piece of information that Peter Korsgaard will need when reviewing patches for backport to stable branches.

So could you please always, always, always to this research and include the relevant information in the commit log? It will make things a lot easier when reviewing/merging the patches.

The final commit log looks like this:

commit fe42fa8017b10602ed57ee066f8a9710f0f8e7ca (HEAD -> master, official/master)

Author: Waldemar Brodkorb <[email protected]>
Date:   Sat Aug 12 10:21:34 2023 +0200

package/libedit: fix compile error with uClibc

In Buildroot commit cc69dbf8fdef6619c4ea09a4aaa97cd5ad3ee423 ("package/libedit: bump version to 20221030-3.1"), the version of libedit was bumped from 20210910-3.1 to 20221030-3.1. This broke the build with uClibc:

./sys.h:96:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?

Header file uses ssize_t so sys/types.h must be included.

This commit adds a patch that fixes this issue.

Fixes:

http://autobuild.buildroot.net/results/439538b23776a58ff81c38754a19ee92c3590a1f

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hi Thomas,
Thomas Petazzoni wrote,

Quoted 55 lines

Hello Waldemar,

Quoted 5 lines · On Sat, 12 Aug 2023 10:21:34 +0200 Waldemar Brodkorb <[email protected]> wrote:

Header file uses ssize_t so sys/types.h must be included.

Fixes:
- http://autobuild.buildroot.net/results/439/439538b23776a58ff81c38754a19ee92c3590a1f

Quoted 7 lines

---
Author was informed via email about the issue.

---
 package/libedit/0002-add-sys-types_h.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 package/libedit/0002-add-sys-types_h.patch

I have applied to master, but after significantly improving the commit log. For all the "fixes" that you send, there is almost always a critical information that is missing: since when is the problem occurring. Indeed, we want to know if the fix needs to be backported to one of our stable branches or not.

So here, I had to do that research myself, to realize it's the version bump in commit cc69dbf8fdef6619c4ea09a4aaa97cd5ad3ee423 that introduced the regression. Since this commit is no yet in any release (other than 2023.08-rc1), there is no need to backport your fix to a previous stable Buildroot branch. This is really a critical piece of information that Peter Korsgaard will need when reviewing patches for backport to stable branches.

So could you please always, always, always to this research and include the relevant information in the commit log? It will make things a lot easier when reviewing/merging the patches.

The final commit log looks like this:

commit fe42fa8017b10602ed57ee066f8a9710f0f8e7ca (HEAD -> master, official/master)

Author: Waldemar Brodkorb <[email protected]>
Date:   Sat Aug 12 10:21:34 2023 +0200

package/libedit: fix compile error with uClibc

In Buildroot commit cc69dbf8fdef6619c4ea09a4aaa97cd5ad3ee423 ("package/libedit: bump version to 20221030-3.1"), the version of libedit was bumped from 20210910-3.1 to 20221030-3.1. This broke the build with uClibc:

./sys.h:96:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?

Header file uses ssize_t so sys/types.h must be included.

This commit adds a patch that fixes this issue.

Quoted 8 lines

Fixes:

http://autobuild.buildroot.net/results/439538b23776a58ff81c38754a19ee92c3590a1f

Thanks!

Okay, sorry for that. I promise I try to find the needed information for my next patches. See my conmon patch I sent today ;)

best regards
Waldemar
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot