From 91b7be12b453c1f0a6f3d5ff70778dedba0a690d Mon Sep 17 00:00:00 2001 From: Nikolaus Klepp Date: Thu, 11 Jun 2015 03:00:34 +0200 Subject: [PATCH] Fix FTBFS on freebsd This resolves Bug 2431 Signed-off-by: Nikolaus Klepp (cherry picked from commit 3be9f300c9a754320a02fd10a729ef797ffb8506) --- tdeio/tdeio/connection.cpp | 2 +- tdeio/tdeio/kurlcompletion.cpp | 4 ++-- tdeprint/cups/make_driver_db_cups.cpp | 3 +++ tdeprint/ppdloader.cpp | 4 ++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tdeio/tdeio/connection.cpp b/tdeio/tdeio/connection.cpp index 50427aecf..fa316f56d 100644 --- a/tdeio/tdeio/connection.cpp +++ b/tdeio/tdeio/connection.cpp @@ -43,7 +43,7 @@ #include #include -#if defined(__OpenBSD__) +#if defined(__OpenBSD__) || defined(__FreeBSD__) #define __progname getprogname() #else extern char *__progname; diff --git a/tdeio/tdeio/kurlcompletion.cpp b/tdeio/tdeio/kurlcompletion.cpp index 9184e0d02..890f9f28c 100644 --- a/tdeio/tdeio/kurlcompletion.cpp +++ b/tdeio/tdeio/kurlcompletion.cpp @@ -778,13 +778,13 @@ bool KURLCompletion::userCompletion(const MyURL &url, TQString *match) // Environment variables // -#if !defined(__OpenBSD__) +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) extern char **environ; // Array of environment variables #endif bool KURLCompletion::envCompletion(const MyURL &url, TQString *match) { -#if defined(__OpenBSD__) +#if defined(__OpenBSD__) || defined(__FreeBSD__) return false; #else if ( url.file().at(0) != '$' ) diff --git a/tdeprint/cups/make_driver_db_cups.cpp b/tdeprint/cups/make_driver_db_cups.cpp index a6dec1169..9b700111f 100644 --- a/tdeprint/cups/make_driver_db_cups.cpp +++ b/tdeprint/cups/make_driver_db_cups.cpp @@ -19,6 +19,9 @@ **/ #include +#ifndef _GNU_SOURCE +#define _GNU_SOURCE /* Needed for getline */ +#endif #include #include #include diff --git a/tdeprint/ppdloader.cpp b/tdeprint/ppdloader.cpp index a194c1c12..fd243b0f9 100644 --- a/tdeprint/ppdloader.cpp +++ b/tdeprint/ppdloader.cpp @@ -17,6 +17,10 @@ * Boston, MA 02110-1301, USA. **/ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE /* Needed for getline */ +#endif + #include "ppdloader.h" #include "foomatic2loader.h" #include "driver.h"