diff options
author | naddy <naddy@FreeBSD.org> | 2002-08-12 17:30:03 +0000 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2002-08-12 17:30:03 +0000 |
commit | dfd2a8518976b8abaa67963931b6784247938dce (patch) | |
tree | 2ad29018e1b7dc915472ae83b68b4a4670dd918c /astro | |
parent | 709c6e1b82a1661cf1db91a16d0f92277125eb8e (diff) | |
download | FreeBSD-ports-dfd2a8518976b8abaa67963931b6784247938dce.zip FreeBSD-ports-dfd2a8518976b8abaa67963931b6784247938dce.tar.gz |
Fix build on non-i386.
Submitted by: Marco Molteni <molter@tin.it>
Diffstat (limited to 'astro')
-rw-r--r-- | astro/gpsdrive/files/patch-src-battery.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/astro/gpsdrive/files/patch-src-battery.c b/astro/gpsdrive/files/patch-src-battery.c new file mode 100644 index 0000000..0680e1d --- /dev/null +++ b/astro/gpsdrive/files/patch-src-battery.c @@ -0,0 +1,43 @@ +--- src/battery.c.orig Mon Aug 12 14:07:55 2002 ++++ src/battery.c Mon Aug 12 14:16:49 2002 +@@ -70,10 +70,11 @@ + #include <gdk-pixbuf/gdk-pixbuf.h> + #include <gtk/gtk.h> + +-#ifdef __FreeBSD__ ++/* APM is i386-specific. */ ++#if defined(__FreeBSD__) && defined(__i386__) + #include <fcntl.h> + #include <machine/apm_bios.h> +-#endif /* __FreeBSD__ */ ++#endif /* __FreeBSD__ && __i386__ */ + + #include "../config.h" + #include "battery.h" +@@ -237,7 +238,7 @@ + #endif /* Linux */ + + +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) && defined(__i386__) + /* + * Return TRUE on success, FALSE on error. + */ +@@ -311,7 +312,7 @@ + close (fd); + return TRUE; + } +-#endif /* __FreeBSD__ */ ++#endif /* __FreeBSD__ && __i386__ */ + + + /* +@@ -326,7 +327,7 @@ + } + #if defined(__linux__) + return battery_get_values_linux (&batlevel, &batloading); +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) && defined(__i386__) + return battery_get_values_fbsd (&batlevel, &batloading); + #else + /* add support for your favourite OS here */ |