# However, on *other platforms* it fails when some of those flags
--- /dev/null
+++ b/networking/nslookup_lede.c
-@@ -0,0 +1,915 @@
+@@ -0,0 +1,914 @@
+/*
+ * nslookup_lede - musl compatible replacement for busybox nslookup
+ *
+ return buf;
+}
+
-+
-+#if ENABLE_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS
-+static const char nslookup_longopts[] ALIGN1 =
-+ "type\0" Required_argument "q"
-+ "querytype\0" Required_argument "q"
-+ "port\0" Required_argument "p"
-+ "retry\0" Required_argument "r"
-+ "timeout\0" Required_argument "t"
-+ "stats\0" Required_argument "s"
-+ ;
-+#endif
-+
+int nslookup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int nslookup_main(int argc, char **argv)
+{
+ HEADER *header;
+
+#if ENABLE_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS
-+ applet_long_options = nslookup_longopts;
-+#endif
++ static const char nslookup_longopts[] ALIGN1 =
++ "type\0" Required_argument "q"
++ "querytype\0" Required_argument "q"
++ "port\0" Required_argument "p"
++ "retry\0" Required_argument "r"
++ "timeout\0" Required_argument "t"
++ "stats\0" No_argument "s"
++ ;
+
-+ opt_complementary = "q::";
-+ opts = getopt32(argv, "+q:*p:+r:+t:+s",
++ opts = getopt32long(argv, "^" "+q:*p:+r:+t:+s" "\0" "q::",
++ nslookup_longopts,
++ &type_strings, &default_port,
++ &default_retry, &default_timeout);
++#else
++ opts = getopt32(argv, "^" "+q:*p:+r:+t:+s" "\0" "q::",
+ &type_strings, &default_port,
+ &default_retry, &default_timeout);
++#endif
+
+ while (type_strings) {
+ ptr = llist_pop(&type_strings);