summaryrefslogtreecommitdiff
path: root/package/digitemp/patches/patch-src_digitemp_c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-06-13 14:56:04 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-06-13 14:56:04 +0200
commit6d7a7f4776711758cf5b59028378f01cd8eba493 (patch)
tree67cc0ff4f56a0d7e1deff1d0a39867d486c86a9b /package/digitemp/patches/patch-src_digitemp_c
parent18b38b0eb68cbcb8793efe989dcd8796a60288af (diff)
FreeBSD compatibility patches
- update ipset and libpri to latest upstream
Diffstat (limited to 'package/digitemp/patches/patch-src_digitemp_c')
-rw-r--r--package/digitemp/patches/patch-src_digitemp_c118
1 files changed, 118 insertions, 0 deletions
diff --git a/package/digitemp/patches/patch-src_digitemp_c b/package/digitemp/patches/patch-src_digitemp_c
new file mode 100644
index 000000000..92b5bcca0
--- /dev/null
+++ b/package/digitemp/patches/patch-src_digitemp_c
@@ -0,0 +1,118 @@
+--- digitemp-3.6.0.orig/src/digitemp.c 2008-08-28 06:42:48.000000000 +0200
++++ digitemp-3.6.0/src/digitemp.c 2009-06-12 21:29:17.000000000 +0200
+@@ -62,9 +62,7 @@
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <unistd.h>
+-#if !defined(AIX) && !defined(SOLARIS) && !defined(FREEBSD) && !defined(DARWIN)
+ #include <getopt.h>
+-#endif /* !AIX and !SOLARIS and !FREEBSD and !DARWIN */
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
+@@ -75,24 +73,11 @@
+ #include <stdint.h>
+ #include "ad26.h"
+
+-// Include endian.h
+-#if DARWIN
+-#include <machine/endian.h>
+-#endif
+-#if FREEBSD
+-#include <sys/endian.h>
+-#endif
+-#if !defined(DARWIN) && !defined(FREEBSD)
+-#include <endian.h>
+-#endif
+-
+-#ifdef LINUX
+ #ifndef OWUSB
+ #ifdef LOCKDEV
+ #include <lockdev.h>
+ #endif
+ #endif
+-#endif
+
+ #include "digitemp.h"
+ #include "device_name.h"
+@@ -101,51 +86,8 @@
+
+
+ /* Setup the correct getopt starting point */
+-#ifdef LINUX
+ #define GETOPTEOF -1
+ #define OPTINDSTART 0
+-#endif
+-
+-#ifdef CYGWIN
+-#define GETOPTEOF -1
+-#define OPTINDSTART 0
+-#endif
+-
+-#ifdef AIX
+-#define OPTINDSTART 0
+-#define GETOPTEOF 255
+-#endif
+-
+-#ifdef SOLARIS
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+-
+-#ifdef FREEBSD
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+-
+-#ifdef OPENBSD
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+-
+-#ifdef NETBSD
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+-
+-#ifdef DARWIN
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+-
+-#ifdef OTHER
+-#define GETOPTEOF EOF
+-#define OPTINDSTART 1
+-#endif
+-
+
+ /* For tracking down strange errors */
+ #undef BCL_DEBUG
+@@ -153,10 +95,6 @@
+ extern char *optarg;
+ extern int optind, opterr, optopt;
+
+-#if defined(FREEBSD) || defined(DARWIN)
+-extern int optreset;
+-#endif /* FREEBSD or DARWIN */
+-
+ extern const char dtlib[]; /* Library Used */
+
+ char serial_port[40], /* Path to the serial port */
+@@ -1928,7 +1866,7 @@ int Walk1Wire()
+ struct _roms coupler_list; /* Attached Roms */
+ int x;
+
+- bzero( &coupler_list, sizeof( struct _roms ) );
++ memset( &coupler_list, 0, sizeof( struct _roms ) );
+
+ /* Find any DS2409 Couplers and turn them all off.
+ This WILL NOT WORK if there is a coupler attached to the
+@@ -2427,7 +2365,7 @@ int main( int argc, char *argv[] )
+
+
+ /* Make sure the structure is erased */
+- bzero( &sensor_list, sizeof( struct _roms ) );
++ memset( &sensor_list, 0, sizeof( struct _roms ) );
+
+
+ if( argc <= 1 )