Skip to content

Alpine-based docker build fails #49

@felixfrenkel

Description

@felixfrenkel

Hi!

I am building v0.1.26 under Alpine based docker and get the following error:
g++ -Wall -O3 -D BUILDNUM=26 -c samblaster.cpp -o samblaster.o

samblaster.cpp: In function 'UINT64 diffTVs(timeval*, timeval*)':
samblaster.cpp:107:20: error: invalid use of incomplete type 'struct timeval'
  107 |     return (((endTV->tv_sec - startTV->tv_sec) * 1000000) + (endTV->tv_usec - startTV->tv_usec));
      |                    ^~
samblaster.cpp:105:31: note: forward declaration of 'struct timeval'
  105 | inline UINT64 diffTVs (struct timeval * startTV, struct timeval * endTV)
      |                               ^~~~~~~
samblaster.cpp:107:38: error: invalid use of incomplete type 'struct timeval'
  107 |     return (((endTV->tv_sec - startTV->tv_sec) * 1000000) + (endTV->tv_usec - startTV->tv_usec));
      |                                      ^~
samblaster.cpp:105:31: note: forward declaration of 'struct timeval'
  105 | inline UINT64 diffTVs (struct timeval * startTV, struct timeval * endTV)
      |                               ^~~~~~~
samblaster.cpp:107:67: error: invalid use of incomplete type 'struct timeval'
  107 |     return (((endTV->tv_sec - startTV->tv_sec) * 1000000) + (endTV->tv_usec - startTV->tv_usec));
      |                                                                   ^~
samblaster.cpp:105:31: note: forward declaration of 'struct timeval'
  105 | inline UINT64 diffTVs (struct timeval * startTV, struct timeval * endTV)
      |                               ^~~~~~~
samblaster.cpp:107:86: error: invalid use of incomplete type 'struct timeval'
  107 |     return (((endTV->tv_sec - startTV->tv_sec) * 1000000) + (endTV->tv_usec - startTV->tv_usec));
      |                                                                                      ^~
samblaster.cpp:105:31: note: forward declaration of 'struct timeval'
  105 | inline UINT64 diffTVs (struct timeval * startTV, struct timeval * endTV)
      |                               ^~~~~~~
make: *** [Makefile:27: samblaster.o] Error 1

What goes wrong here?

Regards, Felix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions