pkgsrc - initial commit
[pkgsrc.git] / audio / buzztard / patches / patch-aa
1 $NetBSD: patch-aa,v 1.1.1.1 2009/09/10 20:16:45 wiz Exp $
2
3 --- src/lib/ic/input-device.c.orig      2008-08-11 16:59:42.000000000 +0000
4 +++ src/lib/ic/input-device.c
5 @@ -44,7 +44,9 @@
6  #include <sys/ioctl.h>
7  #include <sys/types.h>
8  #include <sys/stat.h>
9 +#ifdef __Linux__
10  #include <linux/input.h>
11 +#endif
12  
13  enum {
14    DEVICE_DEVNODE=1
15 @@ -70,6 +72,7 @@ static GObjectClass *parent_class=NULL;
16  #define test_bit(bit, array)    (array[bit>>3] & (1<<(bit&0x7)))
17  
18  static gboolean register_trigger_controls(const BtIcInputDevice * const self,int fd) {
19 +#ifdef __Linux__
20    BtIcTriggerControl *control;
21    guint ix;
22    guint8 key_bitmask[KEY_MAX/8 + 1];
23 @@ -152,10 +155,12 @@ static gboolean register_trigger_control
24        }
25      }
26    }
27 +#endif
28    return(TRUE);
29  }
30  
31  static gboolean register_abs_range_controls(const BtIcInputDevice * const self,int fd) {
32 +#ifdef __Linux__
33    BtIcAbsRangeControl *control;
34    guint ix;
35    guint8 abs_bitmask[ABS_MAX/8 + 1];
36 @@ -220,10 +225,12 @@ static gboolean register_abs_range_contr
37      }
38    }
39    // create controller instances and register them
40 +#endif
41    return(TRUE);
42  }
43  
44  static gboolean register_controls(const BtIcInputDevice * const self) {
45 +#ifdef __Linux__
46    int fd;
47    guint ix;
48    guint8 evtype_bitmask[EV_MAX/8 + 1];
49 @@ -280,12 +287,14 @@ static gboolean register_controls(const 
50    }
51  
52    close(fd);
53 +#endif
54    return(TRUE);
55  }
56  
57  //-- handler
58  
59  static gboolean io_handler(GIOChannel *channel,GIOCondition condition,gpointer user_data) {
60 +#ifdef __Linux__
61    BtIcInputDevice *self=BTIC_INPUT_DEVICE(user_data);
62    BtIcControl *control;
63    GError *error=NULL;
64 @@ -326,6 +335,9 @@ static gboolean io_handler(GIOChannel *c
65      self->priv->io_source=-1;
66    }
67    return(res);
68 +#else
69 +  return(FALSE);
70 +#endif
71  }
72  
73  //-- constructor methods