diff options
author | jbeich <jbeich@FreeBSD.org> | 2017-02-01 20:26:15 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2017-02-01 20:26:15 +0800 |
commit | 8d6d91cf1a7e7511189f02d762a73459879877d1 (patch) | |
tree | 9290d4e9732ddcf7a438530bb5510752a8194c75 | |
parent | 719bda42dc4e2433af70a63332966a3aada5c94f (diff) | |
download | freebsd-ports-gnome-8d6d91cf1a7e7511189f02d762a73459879877d1.tar.gz freebsd-ports-gnome-8d6d91cf1a7e7511189f02d762a73459879877d1.tar.zst freebsd-ports-gnome-8d6d91cf1a7e7511189f02d762a73459879877d1.zip |
games/eboard: unbreak with libc++ 3.9
ntext.cc:247:5: error: assigning to 'char *' from incompatible type 'const char *'
p = strchr(text, '\n');
^ ~~~~~~~~~~~~~~~~~~
Reported by: pkg-fallout
-rw-r--r-- | games/eboard/Makefile | 2 | ||||
-rw-r--r-- | games/eboard/files/patch-ntext.cc | 24 |
2 files changed, 25 insertions, 1 deletions
diff --git a/games/eboard/Makefile b/games/eboard/Makefile index 015c4eb15895..14e7daa99a40 100644 --- a/games/eboard/Makefile +++ b/games/eboard/Makefile @@ -3,7 +3,7 @@ PORTNAME= eboard PORTVERSION= 1.1.1 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= games MASTER_SITES= SF \ SF/${PORTNAME}/eboard-extras/pack%201%20patchlevel%202/:p1 \ diff --git a/games/eboard/files/patch-ntext.cc b/games/eboard/files/patch-ntext.cc new file mode 100644 index 000000000000..b87bfa523882 --- /dev/null +++ b/games/eboard/files/patch-ntext.cc @@ -0,0 +1,24 @@ +--- ntext.cc.orig 2008-02-22 15:51:22 UTC ++++ ntext.cc +@@ -237,7 +237,7 @@ void NText::setBG(int c) { + void NText::append(const char *text, int len, int color) { + int i; + NLine *nl; +- char *p; ++ const char *p; + + if (len < 0) { + discardExcess(); +@@ -246,10 +246,8 @@ void NText::append(const char *text, int + + p = strchr(text, '\n'); + if (p!=NULL) { +- *p = 0; +- i = strlen(text); +- nl = new NLine(text, color); +- *p = '\n'; ++ i = p - text; ++ nl = new NLine(text, color, i); + lines.push_back(nl); + formatLine(lines.size()-1); + append(&p[1], len-(i+1), color); |