Skip to content

Commit

Permalink
Merge pull request msys2#6756 from Biswa96/termcap-repalce-write-fprintf
Browse files Browse the repository at this point in the history
termcap: add patch to replace write with fprintf(stderr)
  • Loading branch information
lazka committed Aug 4, 2020
2 parents 60e1f7e + c6691ad commit 625370e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
19 changes: 19 additions & 0 deletions mingw-w64-termcap/0001-tparam-replace-write-with-fprintf.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- termcap-1.3.1.orig/tparam.c
+++ termcap-1.3.1/tparam.c
@@ -26,6 +26,7 @@
#else

#ifdef STDC_HEADERS
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#else
@@ -48,7 +49,7 @@
static void
memory_out ()
{
- write (2, "virtual memory exhausted\n", 25);
+ fprintf (stderr, "virtual memory exhausted\n");
exit (1);
}

12 changes: 9 additions & 3 deletions mingw-w64-termcap/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ _realname=termcap
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.3.1
pkgrel=5
pkgrel=6
pkgdesc="Terminal feature database (mingw-w64)"
arch=('any')
url="https://www.gnu.org/software/termutils/"
license=("GPL" "LGPL")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
options=('staticlibs' 'strip')
source=("https://ftp.gnu.org/gnu/termcap/${_realname}-${pkgver}.tar.gz")
sha256sums=('91a0e22e5387ca4467b5bcb18edf1c51b930262fd466d5fda396dd9d26719100')
source=("https://ftp.gnu.org/gnu/termcap/${_realname}-${pkgver}.tar.gz"
"0001-tparam-replace-write-with-fprintf.patch")
sha256sums=('91a0e22e5387ca4467b5bcb18edf1c51b930262fd466d5fda396dd9d26719100'
'47d5da2df6bc7f3401b7e33eb80d40153bca60278e58b503ffb19589acd7c2da')

prepare() {
cd "${srcdir}/${_realname}-${pkgver}"

# fixes tparam.c: warning: implicit declaration of function 'write'
patch -Nbp1 -i "${srcdir}/0001-tparam-replace-write-with-fprintf.patch"

autoconf
}

Expand Down

0 comments on commit 625370e

Please sign in to comment.