Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832981 - sys-power/suspend-1.0_p20200924 fails to compile: swsusp.h:61:9: error: unknown type name loff_t
Summary: sys-power/suspend-1.0_p20200924 fails to compile: swsusp.h:61:9: error: unkno...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrew Savchenko
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-02-09 11:34 UTC by Agostino Sarubbo
Modified: 2023-10-12 17:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,67.50 KB, text/plain)
2022-02-09 11:34 UTC, Agostino Sarubbo
Details
Missing #define _GNU_SOURCE (suspend-1.0_p20200924-lofft.patch,670 bytes, patch)
2023-10-12 17:06 UTC, noosfaira
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-02-09 11:34:08 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sys-power/suspend-1.0_p20200924 fails to compile.
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
This machine uses MUSL libc
Comment 1 Agostino Sarubbo gentoo-dev 2022-02-09 11:34:11 UTC
Created attachment 764682 [details]
build.log

build log and emerge --info
Comment 2 Leonard Gomez 2022-08-30 00:14:23 UTC
Still broken on musl
Comment 3 noosfaira 2023-10-12 17:06:31 UTC
Created attachment 872607 [details, diff]
Missing #define _GNU_SOURCE

Fix for sys-power/suspend on musl hardened.

I wrote a long post but it got deleted.

Now briefly, three files missing a #define:

#define _GNU_SOURCE

The files are:

swsusp.h
suspend.c
load.c

My initial tests where with a GCC option like this:

CFLAGS="${COMMON_FLAGS}-D_GNU_SOURCE" emerge sys-power/suspend

The patch provided works with all USE flags turned on.
It's a gentoo diff that works as a drop in solution in:

/etc/portage/patches

Thanks.