Browse Source

alpine: fix compilation without sys/cdefs

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 4 years ago
parent
commit
2d155c82ff
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
2 changed files with 39 additions and 1 deletions
  1. +1
    -1
      mail/alpine/Makefile
  2. +38
    -0
      mail/alpine/patches/010-cdefs.patch

+ 1
- 1
mail/alpine/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=alpine
PKG_VERSION:=2.23
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://alpine.x10host.com/alpine/release/src


+ 38
- 0
mail/alpine/patches/010-cdefs.patch View File

@ -0,0 +1,38 @@
--- a/regex/regex.h
+++ b/regex/regex.h
@@ -42,16 +42,12 @@
#ifndef _REGEX_H_
#define _REGEX_H_
-#ifdef WIN32
#include <sys/types.h>
#define __const
#define __BEGIN_DECLS
#define __END_DECLS
#define __P(_X) _X
-#else
-#include <sys/cdefs.h>
#define __stdcall
-#endif
/* types */
typedef off_t regoff_t;
@@ -106,12 +102,16 @@ typedef struct {
#define REG_LARGE 01000 /* force large representation */
#define REG_BACKR 02000 /* force use of backref code */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
int __stdcall regcomp __P((regex_t *, const char *, int));
size_t __stdcall regerror __P((int, const regex_t *, char *, size_t));
int __stdcall regexec __P((const regex_t *,
const char *, size_t, regmatch_t [], int));
void __stdcall regfree __P((regex_t *));
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
#endif /* !_REGEX_H_ */

Loading…
Cancel
Save