From eda8250a16da90c12961ad03b93527f2bfac6d24 Mon Sep 17 00:00:00 2001 From: jasper Date: Thu, 2 Dec 2010 11:40:53 +0000 Subject: [PATCH] - use better ifdef blocks --- devel/mspdebug/patches/patch-olimex_c | 6 +++--- devel/mspdebug/patches/patch-rf2500_c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/devel/mspdebug/patches/patch-olimex_c b/devel/mspdebug/patches/patch-olimex_c index b1539ea6694..0079fbd8ac0 100644 --- a/devel/mspdebug/patches/patch-olimex_c +++ b/devel/mspdebug/patches/patch-olimex_c @@ -1,4 +1,4 @@ -$OpenBSD: patch-olimex_c,v 1.1.1.1 2010/12/02 10:35:04 jasper Exp $ +$OpenBSD: patch-olimex_c,v 1.2 2010/12/02 11:40:53 jasper Exp $ --- olimex.c.orig Wed Aug 4 04:08:43 2010 +++ olimex.c Thu Aug 12 13:04:12 2010 @@ -65,7 +65,7 @@ struct olimex_transport { @@ -6,7 +6,7 @@ $OpenBSD: patch-olimex_c,v 1.1.1.1 2010/12/02 10:35:04 jasper Exp $ struct usb_device *dev, int ino) { -#if !(defined (__APPLE__) || defined(WIN32)) -+#if !(defined (__APPLE__) || defined(WIN32) || defined(__OpenBSD__)) ++#if defined(__linux__) int drv; char drName[256]; #endif @@ -15,7 +15,7 @@ $OpenBSD: patch-olimex_c,v 1.1.1.1 2010/12/02 10:35:04 jasper Exp $ } -#if !(defined(__APPLE__) || defined(WIN32)) -+#if !(defined(__APPLE__) || defined(WIN32) || defined(__OpenBSD__)) ++#if defined(__linux__) drv = usb_get_driver_np(tr->handle, tr->int_number, drName, sizeof(drName)); printf(__FILE__" : driver %d\n", drv); diff --git a/devel/mspdebug/patches/patch-rf2500_c b/devel/mspdebug/patches/patch-rf2500_c index 1f8147250c5..278cdc4c470 100644 --- a/devel/mspdebug/patches/patch-rf2500_c +++ b/devel/mspdebug/patches/patch-rf2500_c @@ -1,4 +1,4 @@ -$OpenBSD: patch-rf2500_c,v 1.1.1.1 2010/12/02 10:35:04 jasper Exp $ +$OpenBSD: patch-rf2500_c,v 1.2 2010/12/02 11:40:53 jasper Exp $ - usb_bulk_read() returns 0 on timeout, not -1 @@ -9,7 +9,7 @@ $OpenBSD: patch-rf2500_c,v 1.1.1.1 2010/12/02 10:35:04 jasper Exp $ } -#if !(defined(__APPLE__) || defined(WIN32)) -+#if !(defined(__APPLE__) || defined(WIN32) || defined(__OpenBSD__)) ++#if defined(__linux__) if (usb_detach_kernel_driver_np(tr->handle, tr->int_number) < 0) perror("rf2500: warning: can't " "detach kernel driver");