mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 08:01:31 +00:00
petidomo: fix build with gcc15 (#516286)
This commit is contained in:
68
pkgs/by-name/pe/petidomo/fix-gcc15.patch
Normal file
68
pkgs/by-name/pe/petidomo/fix-gcc15.patch
Normal file
@@ -0,0 +1,68 @@
|
||||
diff --git a/liblists/lists.h b/liblists/lists.h
|
||||
index 6643552..982c8bc 100644
|
||||
--- a/liblists/lists.h
|
||||
+++ b/liblists/lists.h
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef __cplusplus
|
||||
#ifndef PETIDOMO_HAS_DEFINED_BOOL
|
||||
# define PETIDOMO_HAS_DEFINED_BOOL 1
|
||||
-typedef int bool;
|
||||
+#include <stdbool.h>
|
||||
#endif
|
||||
#ifndef FALSE
|
||||
# define FALSE (0==1)
|
||||
diff --git a/libtext/text.h b/libtext/text.h
|
||||
index a258c79..1fd5274 100644
|
||||
--- a/libtext/text.h
|
||||
+++ b/libtext/text.h
|
||||
@@ -36,7 +36,7 @@ extern "C" {
|
||||
#ifndef __cplusplus
|
||||
#ifndef PETIDOMO_HAS_DEFINED_BOOL
|
||||
# define PETIDOMO_HAS_DEFINED_BOOL 1
|
||||
-typedef int bool;
|
||||
+#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
diff --git a/petidomo.h b/petidomo.h
|
||||
index d503de0..a0c1308 100644
|
||||
--- a/petidomo.h
|
||||
+++ b/petidomo.h
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#ifndef PETIDOMO_HAS_DEFINED_BOOL
|
||||
# define PETIDOMO_HAS_DEFINED_BOOL 1
|
||||
- typedef int bool;
|
||||
+#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#ifndef DEBUG_DMALLOC
|
||||
@@ -135,7 +135,7 @@ struct Mail
|
||||
};
|
||||
|
||||
void RemoveCarrigeReturns(char *buffer);
|
||||
-int isRFC822Address(const char *buffer);
|
||||
+bool isRFC822Address(const char *buffer);
|
||||
int ParseAddressLine(char *buffer);
|
||||
int ParseReplyToLine(char *buffer);
|
||||
int ParseFromLine(char *buffer);
|
||||
@@ -157,8 +157,8 @@ int ArchiveMail(const struct Mail *MailStruct, const char *listname);
|
||||
/********** authen.c **********/
|
||||
|
||||
int FindBodyPassword(struct Mail *MailStruct);
|
||||
-int isValidAdminPassword(const char *password, const char *listname);
|
||||
-int isValidPostingPassword(const char *password, const char *listname);
|
||||
+bool isValidAdminPassword(const char *password, const char *listname);
|
||||
+bool isValidPostingPassword(const char *password, const char *listname);
|
||||
|
||||
/********** filter.c **********/
|
||||
|
||||
@@ -226,7 +226,7 @@ const char *getPassword(void );
|
||||
/********** tool.c **********/
|
||||
|
||||
char *buildFuzzyMatchAddress(const char *);
|
||||
-int isValidListName(const char *);
|
||||
+bool isValidListName(const char *);
|
||||
bool isSubscribed(const char *, const char *, char **, char **, bool);
|
||||
|
||||
/********** unsubscribe.c **********/
|
||||
@@ -17,6 +17,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-ddNw0fq2MQLJd6YCmIkf9lvq9/Xscl94Ds8xR1hfjXQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/peti/petidomo/pull/1
|
||||
./fix-gcc15.patch
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
flex
|
||||
bison
|
||||
@@ -38,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
homepage = "https://petidomo.sourceforge.net/";
|
||||
description = "Simple and easy to administer mailing list server";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
|
||||
mainProgram = "petidomo";
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.peti ];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user