]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/mach/panic.c
xnu-3789.21.4.tar.gz
[apple/xnu.git] / libsyscall / mach / panic.c
index 3992225f142755f6617a5cb52ae8b67cabecf1b2..7049b9561752ce4f003912dd17a2ba465ccbc2c9 100644 (file)
@@ -61,7 +61,7 @@
 #include "abort.h"
 #include "string.h"
 
-int write(int fd, const char* cbuf, int nbyte);
+extern int write(int fd, const char* cbuf, int nbyte);
 
 static mach_port_t master_host_port;
 
@@ -77,7 +77,7 @@ panic(const char *s, ...)
 {
        char buffer[1024];
        int len = _mach_snprintf(buffer, sizeof(buffer), "panic: %s\n", s);
-       write(__STDERR_FILENO, buffer, len+1);
+       write(__STDERR_FILENO, buffer, len);
        
 #define RB_DEBUGGER    0x1000  /* enter debugger NOW */
        (void) host_reboot(master_host_port, RB_DEBUGGER);