Package: libexplain
Version: 0.37.D001-1
Severity: normal
Tags: patch

Hello,

attached is the patch which I needed to get libexplain build in Ubuntu
natty:
* libexplain/iocontrol/siocshwtstamp.c:
  + Add missing include of libexplain/ac/linux/net_tstamp.h.
  + Fix two code errors.

Here the part of the Ubuntu build log:
,----[ 
http://launchpadlibrarian.net/62570091/buildlog_ubuntu-natty-i386.libexplain_0.37.D001-1_FAILEDTOBUILD.txt.gz
 ]-
| libtool: compile:  gcc -Wall -g -O2 -Wall -Wextra -Wl,--as-needed -I. -c 
libexplain/iocontrol/siocshwtstamp.c  -fPIC -DPIC -o 
libexplain/iocontrol/.libs/siocshwtstamp.o
| libexplain/iocontrol/siocshwtstamp.c: In function 'print_explanation':
| libexplain/iocontrol/siocshwtstamp.c:74:21: warning: assignment from 
incompatible pointer type
| libexplain/iocontrol/siocshwtstamp.c:77:60: error: dereferencing pointer to 
incomplete type
| libexplain/iocontrol/siocshwtstamp.c:79:24: error: dereferencing pointer to 
incomplete type
| libexplain/iocontrol/siocshwtstamp.c:90:10: error: expected ':' or '...' 
before '{' token
| libexplain/iocontrol/siocshwtstamp.c:98:21: warning: assignment from 
incompatible pointer type
| libexplain/iocontrol/siocshwtstamp.c:99:60: error: dereferencing pointer to 
incomplete type
| libexplain/iocontrol/siocshwtstamp.c:103:32: error: dereferencing pointer to 
incomplete type
| libexplain/iocontrol/siocshwtstamp.c:105:26: error: 'HWTSTAMP_TX_OFF' 
undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:105:26: note: each undeclared identifier 
is reported only once for each function it appears in
| libexplain/iocontrol/siocshwtstamp.c:106:26: error: 'HWTSTAMP_TX_ON' 
undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:125:29: error: 'cf' undeclared (first 
use in this function)
| libexplain/iocontrol/siocshwtstamp.c:127:26: error: 'HWTSTAMP_FILTER_NONE' 
undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:128:26: error: 'HWTSTAMP_FILTER_ALL' 
undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:129:26: error: 'HWTSTAMP_FILTER_SOME' 
undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:130:26: error: 
'HWTSTAMP_FILTER_PTP_V1_L4_EVENT' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:131:26: error: 
'HWTSTAMP_FILTER_PTP_V1_L4_SYNC' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:132:26: error: 
'HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:133:26: error: 
'HWTSTAMP_FILTER_PTP_V2_L4_EVENT' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:134:26: error: 
'HWTSTAMP_FILTER_PTP_V2_L4_SYNC' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:135:26: error: 
'HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:136:26: error: 
'HWTSTAMP_FILTER_PTP_V2_L2_EVENT' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:137:26: error: 
'HWTSTAMP_FILTER_PTP_V2_L2_SYNC' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:138:26: error: 
'HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:139:26: error: 
'HWTSTAMP_FILTER_PTP_V2_EVENT' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:140:26: error: 
'HWTSTAMP_FILTER_PTP_V2_SYNC' undeclared (first use in this function)
| libexplain/iocontrol/siocshwtstamp.c:141:26: error: 
'HWTSTAMP_FILTER_PTP_V2_DELAY_REQ' undeclared (first use in this function)
| make[1]: *** [libexplain/iocontrol/siocshwtstamp.lo] Error 1
`----

Regards,
Michael
--- libexplain-0.37.D001.orig/libexplain/iocontrol/siocshwtstamp.c
+++ libexplain-0.37.D001/libexplain/iocontrol/siocshwtstamp.c
@@ -21,6 +21,7 @@
 #include <libexplain/ac/linux/sockios.h>
 #include <libexplain/ac/net/if.h>
 #include <libexplain/ac/sys/ioctl.h>
+#include <libexplain/ac/linux/net_tstamp.h>
 
 #include <libexplain/buffer/dac.h>
 #include <libexplain/buffer/einval.h>
@@ -86,7 +87,7 @@
          }
          goto generic;
 
-    case ERANGE
+    case ERANGE:
          {
             const struct ifreq *rq;
 
@@ -122,7 +123,7 @@
 
                     }
 
-                    switch (cf->rx_filter)
+                    switch (cfg->rx_filter)
                     {
                     case HWTSTAMP_FILTER_NONE:
                     case HWTSTAMP_FILTER_ALL:

Reply via email to