From c78426f0330058c1071a8e906ee57f6f8ed4a9f8 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Wed, 4 Nov 2009 22:49:27 +0000 Subject: [PATCH] Sync OpenBSD patchset 487: Change declaration and use of malloc_options to be more standard, from Tim van der Molen. --- tmux.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tmux.c b/tmux.c index a8d1fc6c..96e03cd7 100644 --- a/tmux.c +++ b/tmux.c @@ -1,4 +1,4 @@ -/* $Id: tmux.c,v 1.182 2009-10-28 23:12:38 tcunha Exp $ */ +/* $OpenBSD: tmux.c,v 1.54 2009/11/04 12:41:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -32,7 +32,7 @@ #ifdef DEBUG /* DragonFly uses an OpenBSD-like malloc() since 1.6 */ #if defined(__OpenBSD__) || defined(__DragonFly__) -const char *malloc_options = "AFGJPX"; +extern char *malloc_options; #endif #ifdef __FreeBSD__ const char *_malloc_options = "AJX"; @@ -308,6 +308,10 @@ main(int argc, char **argv) size_t len; int nfds, retcode, opt, flags, cmdflags = 0; +#ifdef DEBUG + malloc_options = (char *) "AFGJPX"; +#endif + flags = 0; shellcmd = label = path = NULL; login_shell = (**argv == '-');