Skip to content

resolve name clash with resolv.h

#include <resolv.h> // part of gclib for IP resolution
#include <Eigen/Core>

This causes the build to fail because resolv contains: #define _res (*__res_state()) and Eigen/src/Core/products/TriangularMatrixMatrix.h uses _res as a parameter name at 4 places.

Now this is clearly resolv's fault for polluting the namespace so heavily but I don't think that's going to change anytime soon, so I thought I'd report it here.

I can easily solve this issue (now that I found it after an eternity of debugging) but would be nice to avoid it by renaming that parameter. I feel it's not too far-fetched that people would include these two files.