Package: libgphoto2 / 2.5.4-1.1

kFreeBSD-ENODATA.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Markus Koschany <apo@gambaru.de>
Date: Thu, 25 Jul 2013 08:19:16 +0200
Subject: kFreeBSD ENODATA

Fix a FTBFS on kFreeBSD with libusb 1.0. ENODATA is undeclared on kfreeBSD thus
use the equivalent ENOATTR.

Forwarded: gphoto-devel@lists.sourceforge.net
---
 libgphoto2_port/libusb1/libusb1.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libgphoto2_port/libusb1/libusb1.c b/libgphoto2_port/libusb1/libusb1.c
index c6b16aa..17a7016 100644
--- a/libgphoto2_port/libusb1/libusb1.c
+++ b/libgphoto2_port/libusb1/libusb1.c
@@ -23,6 +23,13 @@
 #include "config.h"
 #include <gphoto2/gphoto2-port-library.h>
 
+/* Workaround for GNU/kFreeBSD */
+#if defined(__FreeBSD_kernel__)
+#ifndef ENODATA
+#define ENODATA ENOATTR
+#endif
+#endif
+
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>