manual: Fix missing declaration in twalk example.

Without _GNU_SOURCE defined this file fails to compile with the
following error:

    $ gcc manual/examples/twalk.c
    manual/examples/twalk.c: In function ‘twalk’:
    manual/examples/twalk.c:55:3: error: implicit declaration of function ‘twalk_r’; did you mean ‘twalk’? [-Wimplicit-function-declaration]
       55 |   twalk_r (root, twalk_with_twalk_r_action, &closure);
          |   ^~~~~~~
          |   twalk

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Collin Funk 2025-09-28 15:05:40 -07:00
parent 5af86c5eb0
commit a2a773992d
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@
along with this program; if not, see <https://www.gnu.org/licenses/>.
*/
#define _GNU_SOURCE 1
#include <search.h>
struct twalk_with_twalk_r_closure