Skip to content

Commit

Permalink
screen: use right environ for Apple
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Sep 7, 2024
1 parent b71e7b0 commit bcce82a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sysutils/screen/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ checksums ${distname}${extract.suffix} \

patchfiles patch-apple-screen.diff \
patch-apple-window.diff \
patch-tic.diff
patch-tic.diff \
patch-use-right-environ.diff
depends_lib-append port:ncurses

extract.only ${distname}${extract.suffix}
Expand Down
15 changes: 15 additions & 0 deletions sysutils/screen/files/patch-use-right-environ.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- screen.c.orig 2024-08-29 03:55:03.000000000 +0800
+++ screen.c 2024-09-07 14:59:55.000000000 +0800
@@ -59,7 +59,12 @@
#include "utmp.h"
#include "winmsg.h"

+#ifdef __APPLE__
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+#else
extern char **environ;
+#endif

int force_vt = 1;
int VBellWait;

0 comments on commit bcce82a

Please sign in to comment.