devel/synfig: Add DragonFly support
Bring in fix from dports (port is not maintained)
This commit is contained in:
parent
ad7e1e7a3b
commit
b996b3da55
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=382309
1 changed files with 7 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
--- src/synfig/main.cpp.orig
|
||||
--- src/synfig/main.cpp.orig 2014-12-22 11:08:27 UTC
|
||||
+++ src/synfig/main.cpp
|
||||
@@ -193,8 +193,10 @@
|
||||
@@ -193,8 +193,10 @@ synfig::Main::Main(const synfig::String&
|
||||
|
||||
unsigned int i;
|
||||
#ifdef _DEBUG
|
||||
|
@ -11,11 +11,11 @@
|
|||
|
||||
#if defined(HAVE_SIGNAL_H) && defined(SIGPIPE)
|
||||
signal(SIGPIPE, broken_pipe_signal);
|
||||
@@ -464,7 +466,11 @@
|
||||
@@ -464,7 +466,11 @@ synfig::get_binary_path(const String &fa
|
||||
|
||||
/* Read from /proc/self/exe (symlink) */
|
||||
char* path2 = (char*)malloc(buf_size);
|
||||
+#if defined(__FreeBSD__)
|
||||
+#if defined(__FreeBSD__) || defined (__DragonFly__)
|
||||
+ strncpy(path2, "/proc/curproc/file", buf_size - 1);
|
||||
+#else
|
||||
strncpy(path2, "/proc/self/exe", buf_size - 1);
|
||||
|
@ -23,15 +23,15 @@
|
|||
|
||||
while (1) {
|
||||
int i;
|
||||
@@ -501,6 +507,7 @@
|
||||
@@ -501,6 +507,7 @@ synfig::get_binary_path(const String &fa
|
||||
|
||||
free(path2);
|
||||
|
||||
+#if !defined(__FreeBSD__)
|
||||
+#if ! (defined(__FreeBSD__) || defined(__DragonFly__))
|
||||
if (result == "")
|
||||
{
|
||||
/* readlink() or stat() failed; this can happen when the program is
|
||||
@@ -542,6 +549,7 @@
|
||||
@@ -542,6 +549,7 @@ synfig::get_binary_path(const String &fa
|
||||
free(line);
|
||||
fclose(f);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue