freeipmi: unbreak musl builds
This commit is contained in:
parent
169f7f530a
commit
2503e57e99
2 changed files with 70 additions and 2 deletions
69
srcpkgs/freeipmi/patches/fix-build-with-C99-compilers.patch
Normal file
69
srcpkgs/freeipmi/patches/fix-build-with-C99-compilers.patch
Normal file
|
@ -0,0 +1,69 @@
|
|||
Source: http://lists.busybox.net/pipermail/buildroot/2016-September/172879.html
|
||||
|
||||
"The issue is that C99 changed inline semantics. This patch takes these
|
||||
changes into account and allows to build the bundled argp and therefore
|
||||
[freeipmi] with non-C89-compilers."
|
||||
|
||||
--- common/portability/freeipmi-argp-fmtstream.c.orig 2017-08-16 20:28:19.000000000 +0200
|
||||
+++ common/portability/freeipmi-argp-fmtstream.c 2017-10-19 15:53:41.419508328 +0200
|
||||
@@ -389,6 +389,7 @@
|
||||
weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
|
||||
#endif
|
||||
|
||||
+#if __STDC_VERSION__ - 199900L < 1
|
||||
/* Duplicate the inline definitions in argp-fmtstream.h, for compilers
|
||||
* that don't do inlining. */
|
||||
size_t
|
||||
@@ -471,5 +472,6 @@
|
||||
__argp_fmtstream_update (__fs);
|
||||
return __fs->point_col >= 0 ? __fs->point_col : 0;
|
||||
}
|
||||
+#endif /* __STDC_VERSION__ - 199900L < 1 */
|
||||
|
||||
#endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
|
||||
--- common/portability/freeipmi-argp-fmtstream.h.orig 2017-08-16 20:28:19.000000000 +0200
|
||||
+++ common/portability/freeipmi-argp-fmtstream.h 2017-10-19 15:58:36.245170810 +0200
|
||||
@@ -145,6 +145,7 @@
|
||||
__const char *__fmt, ...)
|
||||
PRINTF_STYLE(2,3);
|
||||
|
||||
+#if __STDC_VERSION__ - 199900L < 1
|
||||
extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
|
||||
extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
|
||||
|
||||
@@ -155,6 +156,7 @@
|
||||
__const char *__str, size_t __len);
|
||||
extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
|
||||
__const char *__str, size_t __len);
|
||||
+#endif /* __STDC_VERSION__ - 199900L < 1 */
|
||||
|
||||
/* Access macros for various bits of state. */
|
||||
#define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
|
||||
@@ -164,6 +166,7 @@
|
||||
#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
|
||||
#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
|
||||
|
||||
+#if __STDC_VERSION__ - 199900L < 1
|
||||
/* Set __FS's left margin to LMARGIN and return the old value. */
|
||||
extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
|
||||
size_t __lmargin);
|
||||
@@ -185,6 +188,7 @@
|
||||
/* Return the column number of the current output point in __FS. */
|
||||
extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
|
||||
extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
|
||||
+#endif /* __STDC_VERSION__ - 199900L < 1 */
|
||||
|
||||
/* Internal routines. */
|
||||
extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
|
||||
@@ -208,7 +212,11 @@
|
||||
#endif
|
||||
|
||||
#ifndef ARGP_FS_EI
|
||||
+#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
|
||||
#define ARGP_FS_EI extern inline
|
||||
+#else
|
||||
+#define ARGP_FS_EI inline
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
ARGP_FS_EI size_t
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'freeipmi'
|
||||
pkgname=freeipmi
|
||||
version=1.5.7
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=gnu-configure
|
||||
configure_args="--without-systemdsystemunitdir ac_cv_header_sys_stropts_h=no"
|
||||
conf_files="/etc/freeipmi/*.conf"
|
||||
|
@ -17,7 +17,6 @@ checksum=b46c9432e8649b87d4646bbf4da32f7e9039796fc256f4b229c94c3ac7d0bde5
|
|||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
aarch64) configure_args+=" ac_cv_header_sys_io_h=no";;
|
||||
*-musl) broken="Bunches of freeipmi-argp-namefrob.h:62:32: error: redefinition of 'argp_fmtstream_write'"
|
||||
esac
|
||||
|
||||
post_install() {
|
||||
|
|
Loading…
Reference in a new issue