[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] using errno properly

From: Rishi Khan
Subject: [lwip-users] using errno properly
Date: Sun, 15 Jun 2008 02:12:21 -0400

Does anyone have an example of how to use errno correctly in lwip? When I do this, it gives me undefined reference to __errno:
#include "lwip/opt.h"
#include "lwip/init.h"
#include "lwip/sys.h"
#include "lwip/tcp.h"
#include "lwip/inet_chksum.h"
#include "lwip/tcpip.h"
#include "lwip/stats.h"
#include "lwip/sockets.h"
#include "lwip/ip_addr.h"


      len =  lwip_recv(connect_sock, buf, 10000, 0);
      if (len <= 0)
        if (errno == ESHUTDOWN) break;
        else if ((errno == ENOMEM) || (errno == ENOBUFS)) continue;
else kprintf("RECV error: %d. See lwip/api/sockets.c. \n",errno);

This gives me:
my_file.o:  Undefined reference to:  __errno

Any ideas what is wrong??

My sys_arch.c has "#include <errno.h>" just like the unixsim port


reply via email to

[Prev in Thread] Current Thread [Next in Thread]