aboutsummaryrefslogtreecommitdiff
path: root/src/examples/demo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/demo.c')
-rw-r--r--src/examples/demo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/examples/demo.c b/src/examples/demo.c
index 8b0fa881..3f953a8f 100644
--- a/src/examples/demo.c
+++ b/src/examples/demo.c
@@ -796,6 +796,7 @@ catcher (int sig)
796/** 796/**
797 * setup handlers to ignore SIGPIPE. 797 * setup handlers to ignore SIGPIPE.
798 */ 798 */
799#ifndef MINGW
799static void 800static void
800ignore_sigpipe () 801ignore_sigpipe ()
801{ 802{
@@ -813,7 +814,7 @@ ignore_sigpipe ()
813 fprintf (stderr, 814 fprintf (stderr,
814 "Failed to install SIGPIPE handler: %s\n", strerror (errno)); 815 "Failed to install SIGPIPE handler: %s\n", strerror (errno));
815} 816}
816 817#endif
817 818
818/** 819/**
819 * Entry point to demo. Note: this HTTP server will make all 820 * Entry point to demo. Note: this HTTP server will make all
@@ -838,7 +839,9 @@ main (int argc, char *const *argv)
838 "%s PORT\n", argv[0]); 839 "%s PORT\n", argv[0]);
839 return 1; 840 return 1;
840 } 841 }
842 #ifndef MINGW
841 ignore_sigpipe (); 843 ignore_sigpipe ();
844 #endif
842 magic = magic_open (MAGIC_MIME_TYPE); 845 magic = magic_open (MAGIC_MIME_TYPE);
843 (void) magic_load (magic, NULL); 846 (void) magic_load (magic, NULL);
844 847