-
Notifications
You must be signed in to change notification settings - Fork 39
Fix conflicts to support Newlib4.4 and pthread-embedded #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,6 +82,7 @@ LIBLWIP_CFLAGS-y += -Wno-type-limits -Wno-unused-parameter | |
| LIBLWIP_CFLAGS-$(call have_clang) += -Wno-macro-redefined | ||
| LIBLWIP_CFLAGS-$(CONFIG_LWIP_DEBUG) += -DUK_DEBUG | ||
| LIBLWIP_CFLAGS-y += -D__IN_LIBLWIP__ | ||
| LIBLWIP_CFLAGS-y += -DWORKAROUND_NEWLIB | ||
| LIBLWIP_CXXFLAGS-y += -D__IN_LIBLWIP__ | ||
|
|
||
| ################################################################################ | ||
|
|
@@ -94,7 +95,6 @@ LIBLWIP_SRCS-$(CONFIG_LWIP_THREADS) += $(LIBLWIP_BASE)/mailbox.c|unikraft | |
| LIBLWIP_SRCS-$(CONFIG_LWIP_THREADS) += $(LIBLWIP_BASE)/threads.c|unikraft | ||
| LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/init.c|unikraft | ||
| LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/time.c|unikraft | ||
| LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/sendfile.c|unikraft | ||
|
||
| LIBLWIP_SRCS-$(CONFIG_LWIP_SOCKET) += $(LIBLWIP_BASE)/sockets.c|unikraft | ||
| LIBLWIP_SOCKETS_FLAGS-$(call gcc_version_ge,8,0) += -Wno-cast-function-type | ||
| LIBLWIP_SRCS-y += $(LIBLWIP_EXTRACTED)/core/init.c | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,13 @@ typedef u_long tcp_seq; | |
| * TCP header. | ||
| * Per RFC 793, September, 1981. | ||
| */ | ||
|
|
||
| #include <uk/config.h> | ||
|
|
||
| #if ((defined CONFIG_ARCH_X86_64) || (defined CONFIG_ARCH_ARM_64)) | ||
| #include <endian.h> | ||
| #endif | ||
|
Comment on lines
+47
to
+49
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this for x86 and arm only? I know we don't support the others that well, but do you believe that this would not work with RISCV for example?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code works for any 64-bit little-endian platform. I added this macro because some libraries, like lwIP, depend on the endianness of the system. When we add support for a new architecture, we must also add it here. If we don’t, we will get an error. That error is on purpose, it shows us that this code depends on the platform, and we need to update it (if it is needed for new platform). In this way, the errors help us remember what to consider when porting to new platforms.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's fine to not error on new architectures. It's expected for lwip to depend on endianess, and the point of |
||
|
|
||
| struct tcphdr { | ||
| u_short th_sport; /* source port */ | ||
| u_short th_dport; /* destination port */ | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could have a better name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name is suggested by chatGPT :D , if you think it is a bad suggestion I can change it ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually needed here? I don't see any changes related to this.