From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: "Steve Simon" Date: Sat, 21 Jun 2014 20:45:24 +0100 To: 9fans@9fans.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] (no subject) Topicbox-Message-UUID: fc46eca8-ead8-11e9-9d60-3106f5b1d025 Subject p9p and writable strings Anyone built p9p recently, how do you cope with modern gcc which now places all string constants in a readonly section in the executable, and there is nolonger an option to prevent it. the two main offenders I have found so far are mktemp() and cleanname(). In several places these are passed string constants. the obvious alternatives would be to have these two functions return malloc'ed memory (and remeber to free it later), or to replace the string constant with an initialised variable. What has anyone else done? have I missed somthing? -Steve