-diff -ru source/builtin/log.c source-new/builtin/log.c
+diff -ruw source/builtin/log.c source-new/builtin/log.c
 --- source/builtin/log.c	2017-06-04 19:08:11.000000000 -0600
-+++ source-new/builtin/log.c	2018-12-02 16:07:24.784757087 -0700
++++ source-new/builtin/log.c	2018-12-26 18:36:28.141445392 -0700
 @@ -308,6 +308,7 @@
  
  static void setup_early_output(struct rev_info *rev)
  {
-+#if 0
++#if !defined(__redox__)
  	struct sigaction sa;
  
  	/*

 	nport = strtoul(port, &ep, 10);
 	if ( ep == port || *ep ) {
 		/* Not numeric */
-		struct servent *se = getservbyname(port,"tcp");
-		if ( !se )
-			die("Unknown port %s", port);
-		nport = se->s_port;
+		die("Unknown port %s", port);
 	}
 
 	if (flags & CONNECT_VERBOSE)
@@ -507,7 +504,7 @@
 	int sockfd = git_tcp_connect_sock(host, flags);
 
 	fd[0] = sockfd;
-	fd[1] = dup(sockfd);
+	fd[1] = sockfd;
 }
 
 
diff -ru source/credential-cache--daemon.c source-new/credential-cache--daemon.c
--- source/credential-cache--daemon.c	2017-06-04 19:08:11.000000000 -0600
+++ source-new/credential-cache--daemon.c	2018-12-02 16:07:24.788757117 -0700
@@ -156,6 +156,7 @@
 	strbuf_release(&action);
 }
 
+#if 0
 static int serve_cache_loop(int fd)
 {
 	struct pollfd pfd;
@@ -256,6 +257,7 @@
 
 	free(path_copy);
 }
+#endif
 
 int cmd_main(int argc, const char **argv)
 {
@@ -274,6 +276,7 @@
 
 	git_config_get_bool("credentialcache.ignoresighup", &ignore_sighup);
 
+#if 0
 	argc = parse_options(argc, argv, NULL, options, usage, 0);
 	socket_path = argv[0];
 
@@ -291,6 +294,9 @@
 
 	serve_cache(socket_path, debug);
 	delete_tempfile(&socket_file);
+#endif
+
+	printf("git-credential-cache--daemon not working on Redox\n");
 
 	return 0;
 }
diff -ru source/daemon.c source-new/daemon.c
--- source/daemon.c	2017-06-04 19:08:11.000000000 -0600
+++ source-new/daemon.c	2018-12-02 16:07:24.788757117 -0700
@@ -71,6 +71,7 @@
 	return hi->ip_address.buf;
 }
 
+#if 0
 static void logreport(int priority, const char *err, va_list params)
 {
 	if (log_syslog) {
@@ -89,13 +90,14 @@
 		fflush(stderr);
 	}
 }
+#endif
 
 __attribute__((format (printf, 1, 2)))
 static void logerror(const char *err, ...)
 {
 	va_list params;
 	va_start(params, err);
-	logreport(LOG_ERR, err, params);
+	//logreport(LOG_ERR, err, params);
 	va_end(params);
 }
 
@@ -106,13 +108,13 @@
 	if (!verbose)
 		return;
 	va_start(params, err);
-	logreport(LOG_INFO, err, params);
+	//logreport(LOG_INFO, err, params);
 	va_end(params);
 }
 
 static void NORETURN daemon_die(const char *err, va_list params)
 {
-	logreport(LOG_ERR, err, params);
+	//logreport(LOG_ERR, err, params);
 	exit(1);
 }
 
@@ -888,8 +890,7 @@
 
 	if (!reuseaddr)
 		return 0;
-	return setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
-			  &on, sizeof(on));
+	return 0;
 }
 
 struct socketlist {
@@ -901,7 +902,7 @@
 static const char *ip2str(int family, struct sockaddr *sin, socklen_t len)
 {
 #ifdef NO_IPV6
-	static char ip[INET_ADDRSTRLEN];
+	static char ip[1];
 #else
 	static char ip[INET6_ADDRSTRLEN];
 #endif
@@ -980,7 +981,7 @@
 			close(sockfd);
 			continue;	/* not fatal */
 		}
-		if (listen(sockfd, 5) < 0) {
+		if (1) {
 			logerror("Could not listen to %s: %s",
 				 ip2str(ai->ai_family, ai->ai_addr, ai->ai_addrlen),
 				 strerror(errno));
@@ -1042,7 +1043,7 @@
 		return 0;
 	}
 
-	if (listen(sockfd, 5) < 0) {
+	if (0) {
 		logerror("Could not listen to %s: %s",
 			 ip2str(AF_INET, (struct sockaddr *)&sin, sizeof(sin)),
 			 strerror(errno));
@@ -1080,6 +1081,8 @@
 
 static int service_loop(struct socketlist *socklist)
 {
+	die_errno("No daemon support");
+#if 0
 	struct pollfd *pfd;
 	int i;
 
@@ -1116,7 +1119,7 @@
 #endif
 				} ss;
 				socklen_t sslen = sizeof(ss);
-				int incoming = accept(pfd[i].fd, &ss.sa, &sslen);
+				int incoming = -1;
 				if (incoming < 0) {
 					switch (errno) {
 					case EAGAIN:
@@ -1131,6 +1134,7 @@
 			}
 		}
 	}
+#endif
 }
 
 #ifdef NO_POSIX_GOODIES
@@ -1158,7 +1162,7 @@
 static void drop_privileges(struct credentials *cred)
 {
 	if (cred && (initgroups(cred->pass->pw_name, cred->gid) ||
-	    setgid (cred->gid) || setuid(cred->pass->pw_uid)))
+	    1))
 		die("cannot drop privileges");
 }
 
@@ -1174,11 +1178,7 @@
 	if (!group_name)
 		c.gid = c.pass->pw_gid;
 	else {

 
 	while (1) {
-		const char *end = strchrnul(p, ':');
+		const char *end = strchrnul(p, PATH_SEP);
 
 		strbuf_reset(&buf);
 
@@ -622,6 +622,7 @@
 	struct async *async = data;
 	intptr_t ret;
 
+#if !defined(__redox__)
 	if (async->isolate_sigpipe) {
 		sigset_t mask;
 		sigemptyset(&mask);
@@ -631,6 +632,7 @@
 			return (void *)ret;
 		}
 	}
+#endif
 
 	pthread_setspecific(async_key, async);
 	ret = async->proc(async->proc_in, async->proc_out, async->data);
diff -ruw source/setup.c source-new/setup.c
--- source/setup.c	2017-06-04 19:08:11.000000000 -0600
+++ source-new/setup.c	2018-12-26 18:52:50.070479933 -0700
@@ -1146,11 +1146,11 @@
 /* if any standard file descriptor is missing open it to /dev/null */
 void sanitize_stdfds(void)
 {
-	int fd = open("/dev/null", O_RDWR, 0);
+	int fd = open(DEV_NULL, O_RDWR, 0);
 	while (fd != -1 && fd < 2)
 		fd = dup(fd);
 	if (fd == -1)
-		die_errno("open /dev/null or dup failed");
+		die_errno("open %s or dup failed", DEV_NULL);
 	if (fd > 2)
 		close(fd);
 }
@@ -1169,8 +1169,10 @@
 		default:
 			exit(0);
 	}
+#if !defined(__redox__)
 	if (setsid() == -1)
 		die_errno("setsid failed");
+#endif
 	close(0);
 	close(1);
 	close(2);
diff -ruw source/strbuf.c source-new/strbuf.c
--- source/strbuf.c	2017-06-04 19:08:11.000000000 -0600
+++ source-new/strbuf.c	2018-12-26 18:53:39.586122270 -0700
@@ -446,6 +446,13 @@
 	for (;; guessed_len *= 2) {
 		strbuf_grow(sb, guessed_len);
 		if (getcwd(sb->buf, sb->alloc)) {
+#if defined(__redox__)
+			if (strncmp(sb->buf, "file:", 5) == 0) {
+			    char *x = strdup(sb->buf);
+			    strcpy(sb->buf, x+5);
+			    free(x);
+			}
+#endif
 			strbuf_setlen(sb, strlen(sb->buf));
 			return 0;
 		}
