]> git.proxmox.com Git - mirror_edk2.git/commit - StdLib/LibC/Uefi/SysCalls.c
StdLib: Fix compiler compatibility issues:
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 1 Feb 2012 00:17:05 +0000 (00:17 +0000)
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 1 Feb 2012 00:17:05 +0000 (00:17 +0000)
commit4883124668db0f3c7e3e85537ed36fbd7f9bb508
tree02151387bc01fb1016acb29cfbbded642f7e78bf
parent79b3ce7e99eda77ab0c5e7637e805dda291cd631
StdLib: Fix compiler compatibility issues:

tcp.h:    Fix packed structure syntax.  cdefs.h is not included so the existing __packed attribute was not properly expanded.  Non-GCC compilers were also not handled correctly.  Changing to the pack(n) pragma is compatible between all supported compilers.

SysCalls.c:  The utimes() function has a fixed number of arguments and calls a function that takes a va_list argument.  GCC will not allow the va_start, etc., macros to be used in a function with a fixed number of arguments, even though that is valid C.  The workaround was to create a worker function for utimes() that takes a variable number of arguments.  The worker function then uses the va_* macros.

Signed-off-by: darylm503
Reviewed-by: leegrosenbaum
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12977 6f19259b-4bc3-4df7-8a09-765794883524
StdLib/Include/netinet/tcp.h
StdLib/LibC/Uefi/SysCalls.c