lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] tftp_server.c on Windows


From: Dirk Ziegelmeier
Subject: Re: [lwip-devel] tftp_server.c on Windows
Date: Wed, 5 Oct 2016 21:03:05 +0200

Fixed, thank you for reporting!


Ciao
Dirk

--
Dirk Ziegelmeier * address@hidden * http://www.ziegelmeier.net

On Wed, Oct 5, 2016 at 8:48 PM, Gisle Vanem <address@hidden> wrote:
There's some problems compiling tftp_server.c on Windows.
>From MSVC, I got errors like:
  tftp_server.c(72): error C2059: syntax error: 'constant'

because 'ERROR_FILE_NOT_FOUND' is also in <winerror.h>.
Hence I had to patch:

--- a/tftp_server.c 2016-10-05 20:01:54
+++ b/tftp_server.c 2016-10-05 20:43:10
@@ -58,12 +58,21 @@
 #define TFTP_MAX_PAYLOAD_SIZE 512
 #define TFTP_HEADER_LENGTH    4

+#undef ERROR   /* Also in <wingdi.h> */
+
 #define RRQ   1
 #define WRQ   2
 #define DATA  3
 #define ACK   4
 #define ERROR 5

+/* These are also in <winerror.h>
+ */
+#undef ERROR_FILE_NOT_FOUND
+#undef ERROR_DISK_FULL
+#undef ERROR_FILE_EXISTS
+#undef ERROR_NO_SUCH_USER
+
 enum tftp_error {
   ERROR_FILE_NOT_FOUND    = 1,
   ERROR_ACCESS_VIOLATION  = 2,

--
--gv

_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel


reply via email to

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