genode/libports/ports/lwip.mk
Josef Söntgen 69fd7e1c32 libports: update lwip to STABLE-1.4.1-RC1
The new version works fine but there is an issue with connect()
that needs the included patch:

There is no actual handling of EALREADY in lwip. It sets errno
to EALREADY when the connection was established. Unfortunatly this
is really bad because most programs expect to receive errno EISCONN
if the connection was successfully established. So this behaviour
breaks Qt4 and several noux/net packages (like lynx) because those
programs end up in an endless loop trying to connect via an already
connected socket. The longterm solution would be fixing the wrong
behaviour in lwip (there are already bug-reports on lwip's mailinglist)
but for now, it works well enough to simple change lwip's err_to_errno
table to set errno to EISCONN when the connection was established.
2012-08-15 14:31:18 +02:00

44 lines
1.2 KiB
Makefile

include ports/lwip.inc
LWIP_TGZ = $(LWIP).tar.gz
LWIP_URL = http://git.savannah.gnu.org/cgit/lwip.git/snapshot/$(LWIP_TGZ)
#
# Interface to top-level prepare Makefile
#
PORTS += $(LWIP)
#
# Check for tools
#
$(call check_tool,unzip)
prepare-lwip: $(CONTRIB_DIR)/$(LWIP) include/lwip/lwip include/lwip/netif
$(CONTRIB_DIR)/$(LWIP): clean-lwip
#
# Port-specific local rules
#
$(DOWNLOAD_DIR)/$(LWIP_TGZ):
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(LWIP_URL) && touch $@
$(CONTRIB_DIR)/$(LWIP): $(DOWNLOAD_DIR)/$(LWIP_TGZ)
$(VERBOSE)tar xvzf $< -C $(CONTRIB_DIR) && touch $@
$(VERBOSE)find ./src/lib/lwip/ -name "*.patch" |\
xargs -ixxx sh -c "patch -p0 -r - -N -d $(CONTRIB_DIR) < xxx" || true
include/lwip/lwip:
$(VERBOSE)mkdir -p $@
$(VERBOSE)ln -s $(addprefix ../../../, $(wildcard $(CONTRIB_DIR)/$(LWIP)/src/include/lwip/*.h)) -t $@
$(VERBOSE)ln -s $(addprefix ../../../, $(wildcard $(CONTRIB_DIR)/$(LWIP)/src/include/ipv4/lwip/*.h)) -t $@
include/lwip/netif:
$(VERBOSE)mkdir -p $@
$(VERBOSE)ln -s $(addprefix ../../../, $(wildcard $(CONTRIB_DIR)/$(LWIP)/src/include/netif/*.h)) -t $@
clean-lwip:
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(LWIP)
$(VERBOSE)rm -rf include/lwip/lwip
$(VERBOSE)rm -rf include/lwip/netif