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 error #2644

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix build error #2644

wants to merge 1 commit into from

Conversation

gneworld
Copy link

@gneworld gneworld commented Oct 3, 2024

Summary

[linguini@pastabox nuttx]$ make -j
CC: tcpblaster_server.c
LN: platform/board to
/home/linguini/cuinspace/pico-nuttx/apps/platform/dummy tcpblaster_server.c: In function ‘tcpblaster_server’: tcpblaster_server.c:159:14: error: implicit declaration of function ‘accept4’; did you mean ‘accept’? [-Wimplicit-function-declaration]
159 | acceptsd = accept4(listensd, (FAR struct sockaddr *)&myaddr,
&addrlen,
| ^~~~~~~
| accept
make[3]: *** [Makefile:92: tcpblaster_server.hobj] Error 1
make[2]: *** [Makefile:53:
/home/linguini/cuinspace/pico-nuttx/apps/examples/tcpblaster_context]
Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:180: context] Error 2
make: *** [tools/Unix.mk:457:
/home/linguini/cuinspace/pico-nuttx/apps/.context] Error 2
make: *** Waiting for unfinished jobs....

Impact

from #2632

Testing

CI TEST

@nuttxpr
Copy link

nuttxpr commented Oct 4, 2024

[Experimental Bot, please feedback here]

NuttX PR Requirements Review

Meets Requirements? Partially

Summary:

While the PR addresses a real issue (#2632), the summary section lacks crucial details:

  • Missing: Explanation of WHY the change is necessary. What's the underlying cause for the implicit declaration error?
  • Missing: Description of HOW the change fixes the issue. Does it add a header file? Implement a missing function?
  • Present: References the related NuttX Apps issue.

Impact:

  • Insufficient: The impact section is overly brief.
    • Does this fix introduce a new feature or modify an existing one?
    • Are there any user-facing changes?
    • Will this impact specific architectures, boards, or drivers?
    • Does this require documentation updates?

Testing:

  • Insufficient: "CI TEST" is not descriptive enough.
    • Specify the build host OS, CPU, compiler, and versions used.
    • Detail the target architecture, board, and configuration.
    • Provide actual testing logs before and after the change. This is essential to demonstrate the issue and the fix.

Recommendation:

Expand the Summary and Impact sections with the missing information. Provide detailed testing logs to showcase the change's effectiveness.

#ifdef __APPLE__
acceptsd = accept(listensd, (struct sockaddr *)&myaddr, &addrlen);
#else
#if !defined(__APPLE__) && defined(__NuttX__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#if !defined(__APPLE__) && defined(__NuttX__)
#ifdef __NuttX__

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

#ifdef __APPLE__
acceptsd = accept(listensd, (FAR struct sockaddr *)&myaddr, &addrlen);
#else
#if !defined(__APPLE__) && defined(__NuttX__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#if !defined(__APPLE__) && defined(__NuttX__)
#ifdef __NuttX__

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

[linguini@pastabox nuttx]$ make -j
CC:  tcpblaster_server.c
LN: platform/board to
/home/linguini/cuinspace/pico-nuttx/apps/platform/dummy
tcpblaster_server.c: In function ‘tcpblaster_server’:
tcpblaster_server.c:159:14: error: implicit declaration of function
‘accept4’; did you mean ‘accept’? [-Wimplicit-function-declaration]
  159 |   acceptsd = accept4(listensd, (FAR struct sockaddr *)&myaddr,
&addrlen,
      |              ^~~~~~~
      |              accept
make[3]: *** [Makefile:92: tcpblaster_server.hobj] Error 1
make[2]: *** [Makefile:53:
/home/linguini/cuinspace/pico-nuttx/apps/examples/tcpblaster_context]
Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:180: context] Error 2
make: *** [tools/Unix.mk:457:
/home/linguini/cuinspace/pico-nuttx/apps/.context] Error 2
make: *** Waiting for unfinished jobs....

from apache#2632

Signed-off-by: wanggang26 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants