ports/textproc/goldendict/files/patch-bgl_babylon.cc
Boris Samorodov d732440950 1. Fix build with clang and libc++ (3 cases, add "#include <unistd.h>" to
apropriate files):
-----
bgl_babylon.cc:97:19: error: use of undeclared identifier 'dup'
  file = gzdopen( DUP( fileno( f ) ), "r" );
                  ^
bgl_babylon.cc:36:13: note: expanded from macro 'DUP'
#define DUP dup
            ^
-----
processwrapper.cc:99:12: error: use of undeclared identifier 'getpid'
    return getpid();
           ^
-----
qtsingleapplication/src/qtlocalpeer.cpp:96:56: error: no member named 'getuid' in the global namespace
    socketName += QLatin1Char('-') + QString::number(::getuid(), 16);
                                                     ~~^
-----

2. Use new syntax for LIB_DEPENDS.
2013-09-12 13:33:00 +00:00

24 lines
571 B
C++

--- ./bgl_babylon.cc.orig 2010-12-04 00:12:46.000000000 +0300
+++ ./bgl_babylon.cc 2010-12-28 11:46:37.203723541 +0300
@@ -26,6 +26,7 @@
#include<stdlib.h>
#include<string.h>
#include<stdio.h>
+#include<unistd.h>
#include<iconv.h>
#include <QTextDocument>
@@ -648,13 +648,8 @@
inbufbytes = s.size();
outbufbytes = s.size() * 6;
-#ifdef _WIN32
const char *inbuf;
inbuf = s.data();
-#else
- char *inbuf;
- inbuf = (char *)s.data();
-#endif
outbuf = (char*)malloc( outbufbytes + 1 );
memset( outbuf, '\0', outbufbytes + 1 );
defbuf = outbuf;