old DLPI doesn't have dl_sap_length
authorPaul Mackerras <paulus@samba.org>
Mon, 11 Dec 1995 05:18:39 +0000 (05:18 +0000)
committerPaul Mackerras <paulus@samba.org>
Mon, 11 Dec 1995 05:18:39 +0000 (05:18 +0000)
pppd/sys-svr4.c

index 4e4006d0af095fdd7529be8d2c07b472227851d3..716c2bd9d3e787472a6fb287c032a62aafb5a3ee 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-svr4.c,v 1.7 1995/10/27 03:52:56 paulus Exp $";
+static char rcsid[] = "$Id: sys-svr4.c,v 1.8 1995/12/11 05:18:39 paulus Exp $";
 #endif
 
 #include <limits.h>
 #endif
 
 #include <limits.h>
@@ -1143,10 +1143,12 @@ get_hw_addr(name, hwaddr)
 
     adrlen = reply.prim.info_ack.dl_addr_length;
     adrp = (unsigned char *)&reply + reply.prim.info_ack.dl_addr_offset;
 
     adrlen = reply.prim.info_ack.dl_addr_length;
     adrp = (unsigned char *)&reply + reply.prim.info_ack.dl_addr_offset;
+#if DL_CURRENT_VERSION >= 2
     if (reply.prim.info_ack.dl_sap_length < 0)
        adrlen += reply.prim.info_ack.dl_sap_length;
     else
        adrp += reply.prim.info_ack.dl_sap_length;
     if (reply.prim.info_ack.dl_sap_length < 0)
        adrlen += reply.prim.info_ack.dl_sap_length;
     else
        adrp += reply.prim.info_ack.dl_sap_length;
+#endif
     hwaddr->sa_family = AF_UNSPEC;
     memcpy(hwaddr->sa_data, adrp, adrlen);
 
     hwaddr->sa_family = AF_UNSPEC;
     memcpy(hwaddr->sa_data, adrp, adrlen);