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

Update rizin and fix it #3008

Merged
merged 15 commits into from
Aug 9, 2022
Merged

Update rizin and fix it #3008

merged 15 commits into from
Aug 9, 2022

Conversation

imbillow
Copy link
Contributor

@imbillow imbillow commented Aug 5, 2022

Your checklist for this pull request

Detailed description

Test plan (required)

Closing issues

@imbillow
Copy link
Contributor Author

imbillow commented Aug 5, 2022

@ret2libc it seems to have some problems. But I can't reproduce it with the same compiler and Windows SDK version, what do you think?

rizinorg/rizin#2811

c:\projects\cutter\build\include\librz\rz_util/rz_time.h(18): error C2332: 'struct': missing tag name
c:\projects\cutter\build\include\librz\rz_util/rz_time.h(18): error C2556: '*__timezone(void)': overloaded function differs only by return type from 'long *__timezone(void)'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\time.h(74): note: see declaration of '__timezone'
c:\projects\cutter\build\include\librz\rz_util/rz_time.h(18): error C2371: '__timezone': redefinition; different basic types
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\time.h(74): note: see declaration of '__timezone'
c:\projects\cutter\build\include\librz\rz_util/rz_time.h(18): error C2491: '__timezone': definition of dllimport function not allowed
c:\projects\cutter\build\include\librz\rz_util/rz_time.h(24): error C2332: 'struct': missing tag name
c:\projects\cutter\build\include\librz\rz_util/rz_time.h(24): error C2143: syntax error: missing ',' before '*'
c:\projects\cutter\build\include\librz\rz_util/rz_time.h(24): error C2059: syntax error: '*'

@ret2libc
Copy link
Member

ret2libc commented Aug 5, 2022

Could you try this patch?

diff --git a/librz/include/rz_util/rz_time.h b/librz/include/rz_util/rz_time.h
index 685b02db41..14099821c9 100644
--- a/librz/include/rz_util/rz_time.h
+++ b/librz/include/rz_util/rz_time.h
@@ -13,6 +13,7 @@
 #define ASCTIME_BUF_MINLEN 26

 #ifdef _MSC_VER
+#include <rz_windows.h>
 struct timeval;

 struct timezone {

@ret2libc
Copy link
Member

ret2libc commented Aug 5, 2022

Did you use #include "rz_windows.h" because you already tried #include <rz_windows.h>? I think the latter should be right.

@imbillow
Copy link
Contributor Author

imbillow commented Aug 6, 2022

Did you use #include "rz_windows.h" because you already tried #include <rz_windows.h>? I think the latter should be right.

i tried it all

@ret2libc
Copy link
Member

ret2libc commented Aug 6, 2022

Did you use #include "rz_windows.h" because you already tried #include <rz_windows.h>? I think the latter should be right.

i tried it all

Could you put <rz_windows.h> though? Using "rz_windows.h" does not work at all because it can't find the file.

@imbillow
Copy link
Contributor Author

imbillow commented Aug 6, 2022

@ret2libc It found it, but it still didn't solve the original problem

@ret2libc
Copy link
Member

ret2libc commented Aug 6, 2022

@GustavoLCR do you have hints on how to solve this?

@imbillow
Copy link
Contributor Author

imbillow commented Aug 7, 2022

@ret2libc
Copy link
Member

ret2libc commented Aug 7, 2022

We use timezone name though, not _timezone

@imbillow
Copy link
Contributor Author

imbillow commented Aug 7, 2022

We use timezone name though, not _timezone

https://docs.microsoft.com/en-us/cpp/c-runtime-library/compatibility?view=msvc-170

Maybe some POSIX names are exported by default in older versions of UCRT,
which includes timezone

A #define I guess, maybe something else

@XVilka
Copy link
Member

XVilka commented Aug 8, 2022

@imbillow since your PR was merged, along with the version function change - please update the Rizin and also change the function call.

@imbillow
Copy link
Contributor Author

imbillow commented Aug 8, 2022

OK

image

@XVilka XVilka merged commit 35f9bfe into dev Aug 9, 2022
@XVilka XVilka deleted the billow/fix branch August 9, 2022 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants