Skip to content

Commit

Permalink
win,fs: Fixes align(8) directive on mingw
Browse files Browse the repository at this point in the history
Fixes: libuv#190
PR-URL: libuv#398
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
  • Loading branch information
Pagghiu authored and saghul committed Jun 16, 2015
1 parent c8eebc9 commit 70bbfa0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/win/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,11 @@ void fs__scandir(uv_fs_t* req) {
* A file name is at most 256 WCHARs long.
* According to MSDN, the buffer must be aligned at an 8-byte boundary.
*/
#if _MSC_VER
__declspec(align(8)) char buffer[8192];
#else
__attribute__ ((aligned (8))) char buffer[8192];
#endif

STATIC_ASSERT(sizeof buffer >=
sizeof(FILE_DIRECTORY_INFORMATION) + 256 * sizeof(WCHAR));
Expand Down

0 comments on commit 70bbfa0

Please sign in to comment.