/* main_v2.c - consumer RECOMPILED against v2 header (the "re-link" fix)
 * Build: gcc -o app_v2 main_v2.c -L. -lgpu
 * Run:   LD_LIBRARY_PATH=. ./app_v2
 *
 * Now the binary's layout matches the library's layout -> correct output.
 */
#include <stdio.h>

struct gpu_info {
    int temperature;
    int gpu_id;
    int power_usage;
};

extern void gpu_info_get(struct gpu_info *info);

int main(void) {
    struct gpu_info info = {0};
    gpu_info_get(&info);
    printf("gpu_id=%d temperature=%d power_usage=%d\n",
           info.gpu_id, info.temperature, info.power_usage);
    return 0;
}
