Skip to content
Snippets Groups Projects
Commit e42d5476 authored by mio's avatar mio Committed by Patrycja Rosa
Browse files

community/fortune: fix build with gcc 14

parent d64cab7f
No related branches found
No related tags found
1 merge request!70714community/fortune: fix build with gcc 14
Pipeline #253934 passed
......@@ -2,7 +2,7 @@
# Maintainer: Andrew Hills <ahills@ednos.net>
pkgname=fortune
pkgver=0.1
pkgrel=3
pkgrel=4
pkgdesc="Fortune cookie program ported from OpenBSD"
url="https://github.com/ahills/fortune"
arch="all"
......@@ -10,7 +10,9 @@ license="BSD-3-Clause"
options="!check" # no test suite
makedepends="libbsd-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ahills/fortune/archive/v$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/ahills/fortune/archive/v$pkgver.tar.gz
gcc14.patch
"
build() {
make PREFIX=/usr
......@@ -20,4 +22,7 @@ package() {
make PREFIX=/usr DESTDIR="$pkgdir" install
}
sha512sums="11c883aef8fafea6237fcd1b45fbbb169d6996a253f1def720dd9379c4bfe1bad050789c6e89eb7f1960abde54fe04d85fd13148bd0af8528de630611c0e6e48 fortune-0.1.tar.gz"
sha512sums="
11c883aef8fafea6237fcd1b45fbbb169d6996a253f1def720dd9379c4bfe1bad050789c6e89eb7f1960abde54fe04d85fd13148bd0af8528de630611c0e6e48 fortune-0.1.tar.gz
38a3ca3ed2ae5a8c6d45464a64d571f5f3cda9ca1d7ab6fe082ab9e32026ecc5e559c6aeef7436cf5a7e877d50faf4e88ef063b5a49a353447563a566fa09190 gcc14.patch
"
--- fortune-0.1-origin/fortune/fortune.c
+++ fortune-0.1/fortune/fortune.c
@@ -33,6 +33,10 @@
* SUCH DAMAGE.
*/
+/* Enable ntohl() and arc4random_uniform */
+#include <arpa/inet.h>
+#include <bsd/stdlib.h>
+
#include <sys/stat.h>
#include <sys/types.h>
--- fortune-0.1-origin/strfile/strfile.c
+++ fortune-0.1/strfile/strfile.c
@@ -32,6 +32,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+/* Enable htonl() and arc4random_uniform() */
+#include <arpa/inet.h>
+#include <bsd/stdlib.h>
+
#include <sys/types.h>
#include <ctype.h>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment