sigprocmask testing program failed with static linking

Mike Frysinger vapier at gentoo.org
Sun Mar 27 08:00:53 UTC 2011


On Sun, Mar 27, 2011 at 3:27 AM, Jian Peng wrote:

please fix your e-mail client to properly wrap long lines.

> >From 2e435b037624eff8c0daaa146d6feca57ce1eecf Mon Sep 17 00:00:00 2001
> From: Jian Peng <jipeng2005 at gmail.com>
> Date: Sat, 26 Mar 2011 23:44:52 -0700
> Subject: [PATCH 1/1] common: fix sigprocmask static linking bug
>
> simple sigprocmask testing program will fail to be compiled due to multiple definition of sigprocmask in libpthread.a and libc.a

you need to manually line wrap your changelog to like 74 chars

> -int sigprocmask(int how, const sigset_t * set, sigset_t * oldset)
> +int __attribute__((weak)) sigprocmask(int how, const sigset_t * set, sigset_t * oldset)

you need to use weak_function.  raw __attribute__((...)) is rarely the
way to go anymore.
-mike


More information about the uClibc mailing list