All pastes #1839735 Raw Edit

Handbrake GTK: use dup2 instead

public text v1 · immutable
#1839735 ·published 2010-03-14 18:08 UTC
rendered paste body
Index: main.c
===================================================================
--- main.c	(revision 3139)
+++ main.c	(working copy)
@@ -546,11 +546,7 @@
 	g_free(config);
 	// Set encoding to raw.
 	g_io_channel_set_encoding (ud->activity_log, NULL, NULL);
-#if !defined(_WIN32)
-	stderr->_fileno = pfd[1];
-#else
-	stderr->_file = pfd[1];
-#endif
+	dup2(pfd[1], /*stderr*/2);
 	setvbuf(stderr, NULL, _IONBF, 0);
 	channel = g_io_channel_unix_new (pfd[0]);
 	// I was getting an this error: