summaryrefslogtreecommitdiff
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 3bb622e6..abb6f933 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -274,8 +274,15 @@ static void setuseragent(void)
int len;
uname(&un);
+ char machine[8];
+ strncpy(machine, un.machine, 8);
+ if(strcmp(machine, "i686") == 0) {
+ __builtin_cpu_init();
+ if (__builtin_cpu_supports("sse2"))
+ strncpy(machine, "pentium4", 8);
+ }
len = snprintf(agent, 100, "pacman/%s (%s %s) libalpm/%s",
- PACKAGE_VERSION, un.sysname, un.machine, alpm_version());
+ PACKAGE_VERSION, un.sysname, machine, alpm_version());
if(len >= 100) {
pm_printf(ALPM_LOG_WARNING, _("HTTP_USER_AGENT truncated\n"));
}