diff --git a/repos/libports/run/libc_getaddrinfo.run b/repos/libports/run/libc_getaddrinfo.run
new file mode 100644
index 0000000000..119a57a102
--- /dev/null
+++ b/repos/libports/run/libc_getaddrinfo.run
@@ -0,0 +1,89 @@
+source ${genode_dir}/repos/base/run/platform_drv.inc
+
+if {[have_spec linux]} {
+ puts "The [run_name] scenario requires QEMU networking."
+ exit 1
+}
+
+set build_components {
+ core init
+ drivers/timer
+ lib/vfs/lxip
+ test/libc_getaddrinfo
+}
+
+append_platform_drv_build_components
+
+build $build_components
+
+create_boot_directory
+
+append config {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+append_platform_drv_config
+
+append config {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ nameserver 10.0.2.3
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+install_config $config
+
+set boot_modules {
+ core init ld.lib.so
+ libc.lib.so libm.lib.so posix.lib.so
+ lxip.lib.so vfs_lxip.lib.so
+ test-libc_getaddrinfo
+ timer
+}
+
+# platform-specific modules
+append_platform_drv_boot_modules
+lappend boot_modules [nic_drv_binary]
+
+build_boot_image $boot_modules
+
+append qemu_args " -nographic -net nic,model=e1000 -net user -net dump,file=[run_dir]/dump.pcap"
+
+run_genode_until "child .* exited with exit value 0.*\n" 20
diff --git a/repos/libports/src/test/libc_getaddrinfo/main.c b/repos/libports/src/test/libc_getaddrinfo/main.c
new file mode 100644
index 0000000000..cc6b82da9d
--- /dev/null
+++ b/repos/libports/src/test/libc_getaddrinfo/main.c
@@ -0,0 +1,63 @@
+/*
+ * \brief Libc getaddrinfo(...) test
+ * \author Emery Hemingway
+ * \date 2018-02-18
+ */
+
+/*
+ * This code lifted from Beej's Guide to Network Programming.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+int main(int argc, char **argv)
+{
+ struct addrinfo hints;
+ char ipstr[INET6_ADDRSTRLEN];
+
+ int i;
+ for (i = 1; i < argc; ++i) {
+ int res;
+ char const *arg = argv[i];
+
+ struct addrinfo *info, *p;
+
+ memset(&hints, 0x00, sizeof(hints));
+ hints.ai_family = AF_UNSPEC;
+
+ res = getaddrinfo(arg, NULL, &hints, &info);
+ if (res != 0) {
+ printf("getaddrinfo error: %d\n", res);
+ continue;
+ }
+
+ for (p = info; p != NULL; p = p->ai_next) {
+ void *addr;
+
+ // get the pointer to the address itself,
+ // different fields in IPv4 and IPv6:
+ if (p->ai_family == AF_INET) { // IPv4
+ struct sockaddr_in *ipv4 = (struct sockaddr_in *)p->ai_addr;
+ addr = &(ipv4->sin_addr);
+ } else { // IPv6
+ struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)p->ai_addr;
+ addr = &(ipv6->sin6_addr);
+ }
+
+ inet_ntop(p->ai_family, addr, ipstr, sizeof ipstr);
+ printf("%s: %s\n", arg, ipstr);
+
+ break;
+ }
+
+ freeaddrinfo(info);
+ }
+
+ return 0;
+}
diff --git a/repos/libports/src/test/libc_getaddrinfo/target.mk b/repos/libports/src/test/libc_getaddrinfo/target.mk
new file mode 100644
index 0000000000..e99199f0e4
--- /dev/null
+++ b/repos/libports/src/test/libc_getaddrinfo/target.mk
@@ -0,0 +1,3 @@
+TARGET = test-libc_getaddrinfo
+SRC_C = main.c
+LIBS = posix