Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

giggle: fix cross, crash #27179

Merged
merged 1 commit into from
Dec 18, 2020
Merged

giggle: fix cross, crash #27179

merged 1 commit into from
Dec 18, 2020

Conversation

sgn
Copy link
Member

@sgn sgn commented Dec 15, 2020

@ndowens
Copy link
Contributor

ndowens commented Dec 15, 2020

Hmm how does the cross patch work to fix? What seems to be doing is removing stuff related to time?

@sgn
Copy link
Member Author

sgn commented Dec 15, 2020

Hmm how does the cross patch work to fix? What seems to be doing is removing stuff related to time?

By not depends on configure's result but libc's pre-defined macro. And not trying to mess to sizeof(time_t), (messing like that is not correct anyway).

return tm;
#else
struct tm *tm = g_new0 (struct tm, 1);
+ long ltime;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include <stdio.h>

int main()
{
        printf("%ld\n", sizeof(long));
}

on my rpi prints 4, so I think it'd be more correct to use long long here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, the original code is cursed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, correct format specifier for size_t is zu :-p

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, true

@sgn
Copy link
Member Author

sgn commented Dec 18, 2020

@sgn sgn mentioned this pull request Dec 18, 2020
@sgn sgn merged commit e5e0627 into void-linux:master Dec 18, 2020
@sgn sgn deleted the fix-giggle branch December 18, 2020 14:11
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants