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

Fix build on FreeBSD #551

Merged
merged 3 commits into from Jun 26, 2019
Merged

Fix build on FreeBSD #551

merged 3 commits into from Jun 26, 2019

Conversation

ghost
Copy link

@ghost ghost commented Jun 26, 2019

In file included from src/scopemeasure.cpp:1:
include/scopemeasure.h:18:17: error: field has incomplete type 'struct timeval'
        struct timeval tv1, tv2;
                       ^
include/scopemeasure.h:18:9: note: forward declaration of 'newsboat::timeval'
        struct timeval tv1, tv2;
               ^
include/scopemeasure.h:18:22: error: field has incomplete type 'struct timeval'
        struct timeval tv1, tv2;
                            ^
include/scopemeasure.h:18:9: note: forward declaration of 'newsboat::timeval'
        struct timeval tv1, tv2;
               ^
2 errors generated.
[...]
In file included from src/filebrowserformaction.cpp:1:
include/filebrowserformaction.h:43:20: error: unknown type name 'mode_t'; did you mean '__mode_t'?
        char get_filetype(mode_t mode);
                          ^~~~~~
                          __mode_t
/usr/include/sys/_types.h:51:20: note: '__mode_t' declared here
typedef __uint16_t      __mode_t;       /* permissions */
                        ^
In file included from src/filebrowserformaction.cpp:1:
include/filebrowserformaction.h:44:24: error: unknown type name 'uid_t'; did you mean 'gid_t'?
        std::string get_owner(uid_t uid);
                              ^~~~~
                              gid_t
/usr/include/grp.h:49:18: note: 'gid_t' declared here
typedef __gid_t         gid_t;
                        ^
In file included from src/filebrowserformaction.cpp:1:
include/filebrowserformaction.h:47:59: error: unknown type name 'mode_t'; did you mean '__mode_t'?
        get_formatted_filename(std::string filename, char ftype, mode_t mode);
                                                                 ^~~~~~
                                                                 __mode_t
/usr/include/sys/_types.h:51:20: note: '__mode_t' declared here
typedef __uint16_t      __mode_t;       /* permissions */
                        ^
3 errors generated.
[...]
In file included from src/newsblururlreader.cpp:1:
In file included from include/newsblururlreader.h:4:
In file included from ./rss/feed.h:7:
rss/item.h:43:2: error: unknown type name 'time_t'
        time_t pubDate_ts;
        ^
1 error generated.
[...]
rss/rssparser.cpp:91:12: error: variable has incomplete type 'struct tm'
        struct tm stm;
                  ^
/usr/include/wchar.h:111:8: note: forward declaration of 'tm'
struct tm;
       ^
rss/rssparser.cpp:135:2: error: unknown type name 'time_t'
        time_t gmttime = mktime(&stm) + offs;
        ^
2 errors generated.

Also unbreak on 32-bit archs (probably also on Linux):

error[E0308]: mismatched types
   --> rust/libnewsboat/src/utils.rs:295:20
    |
293 | pub fn get_auth_method(method: &str) -> u64 {
    |                                         --- expected `u64` because of return type
294 |     match method {
295 |         "basic" => curl_sys::CURLAUTH_BASIC,
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
    |
295 |         "basic" => curl_sys::CURLAUTH_BASIC.into(),
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> rust/libnewsboat/src/utils.rs:308:13
    |
293 | pub fn get_auth_method(method: &str) -> u64 {
    |                                         --- expected `u64` because of return type
...
308 |             curl_sys::CURLAUTH_ANY
    |             ^^^^^^^^^^^^^^^^^^^^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
    |
308 |             curl_sys::CURLAUTH_ANY.into()
    |

Tobias Kortkamp added 3 commits June 26, 2019 06:25
```
In file included from src/scopemeasure.cpp:1:
include/scopemeasure.h:18:17: error: field has incomplete type 'struct timeval'
        struct timeval tv1, tv2;
                       ^
include/scopemeasure.h:18:9: note: forward declaration of 'newsboat::timeval'
        struct timeval tv1, tv2;
               ^
include/scopemeasure.h:18:22: error: field has incomplete type 'struct timeval'
        struct timeval tv1, tv2;
                            ^
include/scopemeasure.h:18:9: note: forward declaration of 'newsboat::timeval'
        struct timeval tv1, tv2;
               ^
2 errors generated.
[...]
In file included from src/filebrowserformaction.cpp:1:
include/filebrowserformaction.h:43:20: error: unknown type name 'mode_t'; did you mean '__mode_t'?
        char get_filetype(mode_t mode);
                          ^~~~~~
                          __mode_t
/usr/include/sys/_types.h:51:20: note: '__mode_t' declared here
typedef __uint16_t      __mode_t;       /* permissions */
                        ^
In file included from src/filebrowserformaction.cpp:1:
include/filebrowserformaction.h:44:24: error: unknown type name 'uid_t'; did you mean 'gid_t'?
        std::string get_owner(uid_t uid);
                              ^~~~~
                              gid_t
/usr/include/grp.h:49:18: note: 'gid_t' declared here
typedef __gid_t         gid_t;
                        ^
In file included from src/filebrowserformaction.cpp:1:
include/filebrowserformaction.h:47:59: error: unknown type name 'mode_t'; did you mean '__mode_t'?
        get_formatted_filename(std::string filename, char ftype, mode_t mode);
                                                                 ^~~~~~
                                                                 __mode_t
/usr/include/sys/_types.h:51:20: note: '__mode_t' declared here
typedef __uint16_t      __mode_t;       /* permissions */
                        ^
3 errors generated.
[...]
In file included from src/newsblururlreader.cpp:1:
In file included from include/newsblururlreader.h:4:
In file included from ./rss/feed.h:7:
rss/item.h:43:2: error: unknown type name 'time_t'
        time_t pubDate_ts;
        ^
1 error generated.
[...]
rss/rssparser.cpp:91:12: error: variable has incomplete type 'struct tm'
        struct tm stm;
                  ^
/usr/include/wchar.h:111:8: note: forward declaration of 'tm'
struct tm;
       ^
rss/rssparser.cpp:135:2: error: unknown type name 'time_t'
        time_t gmttime = mktime(&stm) + offs;
        ^
2 errors generated.
```

Signed-off-by: Tobias Kortkamp <t@tobik.me>
```
error[E0308]: mismatched types
   --> rust/libnewsboat/src/utils.rs:295:20
    |
293 | pub fn get_auth_method(method: &str) -> u64 {
    |                                         --- expected `u64` because of return type
294 |     match method {
295 |         "basic" => curl_sys::CURLAUTH_BASIC,
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
    |
295 |         "basic" => curl_sys::CURLAUTH_BASIC.into(),
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> rust/libnewsboat/src/utils.rs:308:13
    |
293 | pub fn get_auth_method(method: &str) -> u64 {
    |                                         --- expected `u64` because of return type
...
308 |             curl_sys::CURLAUTH_ANY
    |             ^^^^^^^^^^^^^^^^^^^^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
    |
308 |             curl_sys::CURLAUTH_ANY.into()
    |
```
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 40.887% when pulling d22d10a on t6:patch-freebsd into 373f69f on newsboat:master.

4 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 40.887% when pulling d22d10a on t6:patch-freebsd into 373f69f on newsboat:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 40.887% when pulling d22d10a on t6:patch-freebsd into 373f69f on newsboat:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 40.887% when pulling d22d10a on t6:patch-freebsd into 373f69f on newsboat:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 40.887% when pulling d22d10a on t6:patch-freebsd into 373f69f on newsboat:master.

@coveralls
Copy link

coveralls commented Jun 26, 2019

Coverage Status

Coverage decreased (-0.004%) to 40.887% when pulling d22d10a on t6:patch-freebsd into 373f69f on newsboat:master.

@Minoru Minoru merged commit d22d10a into newsboat:master Jun 26, 2019
Minoru added a commit that referenced this pull request Jun 26, 2019
@Minoru
Copy link
Member

Minoru commented Jun 26, 2019

Thank you so very, very much! We don't have CI jobs for either of those, and I'll work on adding them now.

@Minoru Minoru added this to the 2.16.1 milestone Jun 26, 2019
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.

None yet

2 participants