You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/09 00:47:39 UTC

[jira] [Commented] (THRIFT-3497) Build fails with "invalid use of incomplete type"

    [ https://issues.apache.org/jira/browse/THRIFT-3497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15090216#comment-15090216 ] 

ASF GitHub Bot commented on THRIFT-3497:
----------------------------------------

Github user Jens-G commented on the pull request:

    https://github.com/apache/thrift/pull/753#issuecomment-170158504
  
    Hi Simon, is that invalid or why did you close it?


> Build fails with "invalid use of incomplete type"
> -------------------------------------------------
>
>                 Key: THRIFT-3497
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3497
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.9.4
>         Environment: gcc 4.8.5 on Haiku hrev49934 (x86)
>            Reporter: Simon South
>            Assignee: Simon South
>            Priority: Minor
>              Labels: c++, haiku, library
>             Fix For: 0.9.4
>
>
> Building the latest code in git on [Haiku|http://haiku-os.org/] fails with a number of error messages like
> {noformat}
> In file included from src/thrift/concurrency/Monitor.cpp:22:0:
> ./src/thrift/concurrency/Util.h: In static member function 'static void apache::thrift::concurrency::Util::toTimeval(apache::thrift::concurrency::timeval&, int64_t)':
> ./src/thrift/concurrency/Util.h:73:11: error: invalid use of incomplete type 'struct apache::thrift::concurrency::timeval'
>      result.tv_sec = static_cast<uint32_t>(value / MS_PER_S);                // ms to s
>            ^
> In file included from src/thrift/concurrency/Monitor.cpp:20:0:
> ./src/thrift/concurrency/Monitor.h:88:32: error: forward declaration of 'struct apache::thrift::concurrency::timeval'
>    int waitForTime(const struct timeval* abstime) const;
> ...
> {noformat}
> This seems to be caused by {{Monitor.h}} using {{struct timeval}} but not explicitly including {{sys/time.h}}. Changing {{Monitor.h}} so it conditionally includes {{sys/time.h}} on systems that have it resolves the issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)