summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-09-23 14:20:35 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-09-30 14:06:09 +0200
commit805360b8e50e69573ec446674f640c9b7704cb34 (patch)
treeebb4d19349899c1b461ea5ecf53cede08dbfcce2
parentlibnetworking: Update due to Termios changes (diff)
downloadrtems-805360b8e50e69573ec446674f640c9b7704cb34.tar.bz2
pppd: Fix warnings
-rw-r--r--cpukit/libnetworking/net/if_ppp.c12
-rw-r--r--cpukit/pppd/rtemspppd.h13
-rw-r--r--testsuites/samples/pppd/netconfig.h4
3 files changed, 23 insertions, 6 deletions
diff --git a/cpukit/libnetworking/net/if_ppp.c b/cpukit/libnetworking/net/if_ppp.c
index 3f9c16fff7..a1d7a62568 100644
--- a/cpukit/libnetworking/net/if_ppp.c
+++ b/cpukit/libnetworking/net/if_ppp.c
@@ -89,6 +89,7 @@
#include <termios.h>
#include <rtems/termiostypes.h>
#include <rtems/rtems_bsdnet.h>
+#include <rtems/rtemspppd.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
@@ -257,7 +258,9 @@ static rtems_task ppp_txdaemon(rtems_task_argument arg)
rtems_event_set events;
int iprocess = (int )0;
struct ppp_softc *sc = (struct ppp_softc *)arg;
+#ifdef LALL_X
struct mbuf *mp;
+#endif
struct mbuf *mf;
struct mbuf *m;
struct rtems_termios_tty *tp;
@@ -322,7 +325,9 @@ static rtems_task ppp_txdaemon(rtems_task_argument arg)
/* loop over all mbufs in chain */
mf = NULL;
+#ifdef LALL_X
mp = NULL;
+#endif
m = sc->sc_outm;
sc->sc_outmc = m;
@@ -1421,7 +1426,10 @@ ppp_inproc(struct ppp_softc *sc, struct mbuf *m)
struct ifnet *ifp = &sc->sc_if;
struct ifqueue *inq;
int s, ilen, proto, rv;
- u_char *cp, adrs, ctrl;
+ u_char *cp;
+#ifdef VJC
+ u_char adrs, ctrl;
+#endif
struct mbuf *mp;
#ifdef PPP_COMPRESS
struct mbuf *dmp = NULL;
@@ -1443,8 +1451,10 @@ ppp_inproc(struct ppp_softc *sc, struct mbuf *m)
}
cp = mtod(m, u_char *);
+#ifdef VJC
adrs = PPP_ADDRESS(cp);
ctrl = PPP_CONTROL(cp);
+#endif
proto = PPP_PROTOCOL(cp);
if (m->m_flags & M_ERRMARK) {
diff --git a/cpukit/pppd/rtemspppd.h b/cpukit/pppd/rtemspppd.h
index d927650707..a6c8d0b398 100644
--- a/cpukit/pppd/rtemspppd.h
+++ b/cpukit/pppd/rtemspppd.h
@@ -6,13 +6,14 @@
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
- *
- * $Id$
*/
#ifndef RTEMSPPPD_H
#define RTEMSPPPD_H
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
/* define hook function identifiers */
#define RTEMS_PPPD_LINKUP_HOOK 1
@@ -37,4 +38,12 @@ int rtems_pppd_set_option(const char *pOption, const char *pValue);
int rtems_pppd_connect(void);
int rtems_pppd_disconnect(void);
+struct rtems_bsdnet_ifconfig;
+
+int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#endif
diff --git a/testsuites/samples/pppd/netconfig.h b/testsuites/samples/pppd/netconfig.h
index f7f5682d4f..f1d6494864 100644
--- a/testsuites/samples/pppd/netconfig.h
+++ b/testsuites/samples/pppd/netconfig.h
@@ -2,9 +2,7 @@
#define NETCONFIG_H_
#include <bsp.h>
-
-/* external function prototypes */
-extern int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching);
+#include <rtems/rtemspppd.h>
/* Default network interface */
static struct rtems_bsdnet_ifconfig netdriver_config = {