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

pre-renewal compile fails when --enable-packetver=20120410 is used @ char.c:59 #2438

Open
aerodyn4mic opened this Issue Apr 14, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@aerodyn4mic
Copy link

aerodyn4mic commented Apr 14, 2019

Describe the bug
make sql compile fails if option "--enable-packetver=20120410" is specified during configuration.

however, It works successfully if this option is left out.

To Reproduce
Steps to reproduce the behavior:

  1. Pull master branch (04/13/2019) on Debian 64bit, GCC version 6.3

  2. Configure Hercules using:
    ./configure --disable-renewal --enable-packetver=20120410
    make clean
    make sql

  3. The result is 'make sql' compile fails at char.c:59:0 as shown with error below:

make[1]: Leaving directory '/home/aero/Hercules/src/login'
MAKE char_sql
make[1]: Entering directory '/home/aero/Hercules/src/char'
MKDIR obj_sql
CC char.c
In file included from char.c:59:0:
char.c: In function ‘char_send_HC_ACK_CHARINFO_PER_PAGE_tail’:
char.c:2156:23: error: invalid application of ‘sizeof’ to incomplete type ‘struct PACKET_HC_ACK_CHARINFO_PER_PAGE’
WFIFOHEAD(fd, sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE));
^
../common/socket.h:44:50: note: in definition of macro ‘WFIFOHEAD’
#define WFIFOHEAD(fd, size) sockt->wfifohead(fd, size)
^~~~
char.c:2158:3: error: dereferencing pointer to incomplete type ‘struct PACKET_HC_ACK_CHARINFO_PER_PAGE’
p->packetId = HEADER_HC_ACK_CHARINFO_PER_PAGE;
^~
char.c:2158:16: error: ‘HEADER_HC_ACK_CHARINFO_PER_PAGE’ undeclared (first use in this function)
p->packetId = HEADER_HC_ACK_CHARINFO_PER_PAGE;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
char.c:2158:16: note: each undeclared identifier is reported only once for each function it appears in
char.c:2159:24: error: invalid application of ‘sizeof’ to incomplete type ‘struct PACKET_HC_ACK_CHARINFO_PER_PAGE’
p->packetLen = sizeof(struct PACKET_HC_ACK_CHARINFO_PER_PAGE);
^~~~~~
make[1]: *** [Makefile:139: obj_sql/char.o] Error 1
make[1]: Leaving directory '/home/aero/Hercules/src/char'
make: *** [Makefile:116: char_sql] Error 2

Expected behavior
Expectation is the server to be able to compile in pre-renewal mode with the packetver option specified without errors

System specs (please complete the following information):

  • OS: Debian 10? (Buster) 64bit
  • Hercules Version v2019.04.13 ... latest commit as of 04/13/2019
  • Mode: pre-renewal
  • Packet version: 20120410
  • Client type: kRO renewal

Plugins used or source modifications
None used

Additional context
have not gathered crash logs or logging, willing to if instructed on specifics.

4144 added a commit to 4144/Hercules that referenced this issue Apr 14, 2019

@4144

This comment has been minimized.

Copy link
Contributor

4144 commented Apr 14, 2019

Thanks for report,
Try commit c01c357
or use this pr #2432

@aerodyn4mic

This comment has been minimized.

Copy link
Author

aerodyn4mic commented Apr 14, 2019

Much appreciation for the time and work you guys put into this project. Thank you for pointing me in the right direction.

4144 added a commit to 4144/Hercules that referenced this issue Apr 14, 2019

4144 added a commit to 4144/Hercules that referenced this issue Apr 15, 2019

@4144 4144 referenced this issue Apr 16, 2019

Open

Update packets up to 2019-04-10 #2432

3 of 3 tasks complete

4144 added a commit to 4144/Hercules that referenced this issue Apr 17, 2019

4144 added a commit to 4144/Hercules that referenced this issue Apr 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.